Quote:
Originally Posted by jamie_1930
After thinking about this I think I have your code.
if(trig_sw==1)
x1==127
y1==127
x2==127
y2==127
This should be it. Although you still want to check the variables
x1,x2,y1,y2 are supposed to be the joystick direction.
|
All this would do is set the joystick values to 127 for execution of the code loop. To have it really calibrate you need to store the offset from 127 into a variable and then have the code add/subtract it each time.