View Single Post
  #2   Spotlight this post!  
Unread 29-01-2012, 16:48
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: reversing an axis on a joystick

Quote:
Originally Posted by Twisted eric View Post
My team is doing mechanum wheels and I don't know how to program them with two joysticks(or even one). and almost got it but for a normaly set.getY(); will set one side going backwards. Please help.
Just invert the values... when you go positive then change it to negative: -set.getY();
For when you go negative do: Math.abs(set.getY());
Reply With Quote