Skip to content

Instantly share code, notes, and snippets.

@abrightwell
Created January 18, 2014 19:13
Show Gist options
  • Select an option

  • Save abrightwell/8494823 to your computer and use it in GitHub Desktop.

Select an option

Save abrightwell/8494823 to your computer and use it in GitHub Desktop.
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