|
Re: joystick comparison within percentage
In previous years, we did "arcade style" control in the code, even when the drivers used "tank style" input. The speed value was computed from the sum of the two joysticks, and the turn value was the difference. We applied a deadband function to the turn value, which does pretty much what you're asking for. A simple deadband is done like this: if the value is within a certain distance of zero, set it to zero.
(To turn arcade drive values back into tank drive values, the left motor is controlled by the speed plus the turn, and the right motor is controlled by the speed minus the turn.)
|