Thread: Inverting Axis
View Single Post
  #3   Spotlight this post!  
Unread 01-02-2015, 10:36
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 82
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: Inverting Axis

I'd suggest multiplying the axis you want to invert by -1. Example code:

Code:
if (reversing) { //Put whatever code you use to detect if you're reversing here
     myMotor.set(joystick.getYAxis() * -1); //Set a motor to the inverse of the Y axis.
}
Reply With Quote