Quote:
Originally Posted by Ether
Yes.
Code:
change = joystick - limitedJoystick;
if (change>limit) change = limit;
else (if change<-limit) change = -limit;
limitedJoystick += change;
limit is the amount of change you will allow every iteration (e.g. every 20 milliseconds for TeleOp)
limitedJoystick is the rate-limited joystick value you use to control your motors.
|
Hello all. Rocky mentor here w/ a quick question. Wheter we use a Logitech joystick or an Xbox controller (on USB), does a stick give a value of -1 to 1 (analog) or -1, 0, +1 (digital)?
Thanks
