On 7/10/2018 11:53 AM, Evan Koblentz via vcf-midatlantic wrote:
In a test program, I was only getting a range of about 5 to 195, vs. 0-255.
Unless you have a really, REALLY good joystick, you probably won't get the full 0-255 range for either X or Y no matter what, and depending on how the joystick's motion is restricted, you won't be able to even hit the corners fully. This is why many dos games had an option to calibrate the joystick, to set its center postion and the lower left/upper right positions which would roughly correspond to min x min y and max x max y, then take those value and scale them to the desired range with some math. It is also not a bad idea to compensate for the joystick having a 'dead zone' near the center where putting no significant force on the joystick makes it move within a small range, software should compensate and consider the joystick centered unless it leaves that 'dead zone' -- Jonathan Gevaryahu jgevaryahu@gmail.com jgevaryahu@hotmail.com