Created
January 18, 2014 19:13
-
-
Save abrightwell/8494823 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FCHS extends SimpleRobot { | |
| // Create robot drive. | |
| private RobotDrive chassis = new RobotDrive(1, 2); | |
| private Joystick leftStick = new Joystick(1); | |
| private Joystick rightStick = new Joystick(2); | |
| public FCHS() { | |
| // Invert Motors here... In your current code you are trying to invert them | |
| // before the chassis has been "created". Therefore, you will have an error. | |
| // I would recommend initializing the RobotDrive here too... but how you have | |
| // it is fine and perfectly acceptable. | |
| chassis.setInvertedMotor(RobotDrive.MotorType.kRearLeft, true); | |
| chassis.setInvertedMotor(RobotDrive.MotorType.kFrontRight, true); | |
| } | |
| public void autonomous() { | |
| // Autonomous code | |
| } | |
| public void operatorControl() { | |
| // Operator Control Code. | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment