Thread: Inverting Axis
View Single Post
  #18   Spotlight this post!  
Unread 03-02-2015, 16:44
2386programming 2386programming is offline
Registered User
FRC #2386 (Trojans)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Burlington
Posts: 34
2386programming is an unknown quantity at this point
Re: Inverting Axis

Code:
 double strafe = mainStick.getRawAxis(3);
         double forward = mainStick.getRawAxis(1);
         double rotation = mainStick.getRawAxis(2);


//mecanum algotrithms
        double mFL = strafe + forward + rotation;
        double mFR = strafe + forward - rotation;
        double mRL = strafe - forward + rotation;
        double mRR = strafe - forward - rotation;

        FL.set(mFL);
        FR.set(mFR);
        RL.set(mRL);
        RR.set(mRR);

This is my code for regular driving for mecanum but I feel that if I inverted the motot not everything else would be the same.
Reply With Quote