Quote:
Originally Posted by Ether
What does this code do?
Code:
x = x > RobotMap.joystickTolerance ? x : 0;
y = y > RobotMap.joystickTolerance ? y : 0;
twist = twist > RobotMap.joystickTolerance ? twist : 0;
|
That was me trying to set up a dead zone in the middle of the joysticks. Of course, now that you pointed it up I see the problem with my code. That bit makes the value 0 if the joystick is less that the tolerance (0.2), instead of the absolute value of the joystick less than the tolerance. Thanks!