krotbank.blogg.se

Input mapper xinput test
Input mapper xinput test













input mapper xinput test input mapper xinput test

Val = map(val, 0, 388, 135, 230) Mine is mapping 0-388 (For my pot) to 135-230 (This is so I have one pot just for the throttle half of the combined throttle/brake that's on the Raildriver controller. The pot I'm using is from another project and has a resistor inline with the voltage in so my mapping is different. I would suggest testing with the analog input example first to make sure it's all working. You then map this to 0-255 as that is what the Raildriver DLL outputs to the game. The Arduino Leonardo analog inputs are 10bit so you should read a value of 0-1023. It shouldn't really matter about the resistance but make sure it is a linear pot.

#INPUT MAPPER XINPUT TEST SERIAL#

The standard Arduino or Mega will only work in the serial port version. This is so I can use it in the serial port version or the XInput game controller version. (Let me know if this needs work as I'm not famililar with the outputs of the actual Raildriver)Ĭlick to expand.I'm using a Leonardo as it has built in USB. The Bail-Off value will be that of the Right Thubstick Y and Independent Brake value will be 0. I have set it up so to use bail-off hold the DPad Up Button. *Note: The bail-off control on the original Raildriver is a 0-255 analog value like the rest. Independent Brake/Bail-off* - Right Thumbstick Y Here is how the DLL interprets the game controller axis. Going into the Raildriver Calibrate settings in TSW2 will allow you to check it. I have tested it with a PS4 controller mapped to Controller 2 for example to test it. The DLL will pickup only one controller that is not mapped to controller 1. Use anything other than Controller 1 as this controller is mapped to the usual Train Sim World 2 controller functions. I use x360ce to map my controls to an emulated Xbox 360 Controller. With this you can map your game controllers and use directly as TSW2 analog inputs. I have added a new version of the DLL that can now take a XInput game controller input.















Input mapper xinput test