|
Re: Autocalibrate function
I did it slightly differnt.
I read the joystick value at all times. If its greater then the max, or smaller then the lowest, I set either the high/low to the new value, update it in eeprom, and set the new center to (high+low)/2, after that, joystick deadbands are achieved by dividing (high-low) by 30.
I just looked through my code, and realized that I never actually used the center point. Weird, I should probably fix that.
|