Joystick Input calibration in software

We’ve found a working serial joystick with 4 analog axes, but the problem is it’s not calibrated, and there are no calibration wheels on the stick. It’s meant to be calibrated by a driver of some sort. My question is is there a way to manually set the voltage range to map the 0-254 input to?

If I understand what you want, the code that Dave Flowerday posted in this thread should help:

I could do that, but then I would lose everything outside of the joystick’s current range. It’s centered at 69, it’s maximum is 245, so 0 includes a huge range at the bottom. 0 includes what should be 0 - 107 (245-69-69), so I need to change both the center voltage and the mV per input tick. All of the 4 axes are off by alot.

try opening the joystick and seeing if the pots are adjustable