Fix gear ports, swap low/high trigger
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / OI.java
index 0acc3c8067067d572ee34a525ce9fad7f4115fdc..2412a36db7000f2a96f12bdf507bcb81dc7e6e76 100644 (file)
@@ -1,5 +1,6 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.Constants.IntakeArm;
 import org.usfirst.frc.team3501.robot.commands.driving.SetHighGear;
 import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
 import org.usfirst.frc.team3501.robot.commands.driving.ToggleFront;
@@ -39,24 +40,24 @@ public class OI {
     // Left joystick
     gearShift = new JoystickButton(leftJoystick,
         Constants.OI.LEFT_JOYSTICK_GEAR_SHIFT_PORT);
-    gearShift.whenPressed(new SetLowGear());
-    gearShift.whenReleased(new SetHighGear());
+    gearShift.whenPressed(new SetHighGear());
+    gearShift.whenReleased(new SetLowGear());
 
     extendIntake1 = new JoystickButton(leftJoystick,
         Constants.OI.LEFT_JOYSTICK_EXTEND_INTAKE_1_PORT);
-    extendIntake1.whenPressed(new MoveIntakeArm(Constants.IntakeArm.EXTEND));
+    extendIntake1.whenPressed(new MoveIntakeArm(IntakeArm.EXTEND));
 
     extendIntake2 = new JoystickButton(leftJoystick,
         Constants.OI.LEFT_JOYSTICK_EXTEND_INTAKE_2_PORT);
-    extendIntake2.whenPressed(new MoveIntakeArm(Constants.IntakeArm.EXTEND));
+    extendIntake2.whenPressed(new MoveIntakeArm(IntakeArm.EXTEND));
 
     retractIntake1 = new JoystickButton(leftJoystick,
         Constants.OI.LEFT_JOYSTICK_RETRACT_INTAKE_1_PORT);
-    retractIntake1.whenPressed(new MoveIntakeArm(Constants.IntakeArm.RETRACT));
+    retractIntake1.whenPressed(new MoveIntakeArm(IntakeArm.RETRACT));
 
     retractIntake2 = new JoystickButton(leftJoystick,
         Constants.OI.LEFT_JOYSTICK_RETRACT_INTAKE_2_PORT);
-    retractIntake2.whenPressed(new MoveIntakeArm(Constants.IntakeArm.RETRACT));
+    retractIntake2.whenPressed(new MoveIntakeArm(IntakeArm.RETRACT));
 
     toggleFront = new JoystickButton(leftJoystick,
         Constants.OI.LEFT_JOYSTICK_TOGGLE_FRONT_PORT);
@@ -65,18 +66,18 @@ public class OI {
     // Right joystick
     intake = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_INTAKE_PORT);
-    intake.whenPressed(new RunIntake(Constants.IntakeArm.IN));
-    intake.whenReleased(new RunIntake(Constants.IntakeArm.STOP));
+    intake.whenPressed(new RunIntake(IntakeArm.IN));
+    intake.whenReleased(new RunIntake(IntakeArm.STOP));
 
     outtake1 = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_OUTTAKE_1_PORT);
-    outtake1.whenPressed(new RunIntake(Constants.IntakeArm.OUT));
-    outtake1.whenReleased(new RunIntake(Constants.IntakeArm.STOP));
+    outtake1.whenPressed(new RunIntake(IntakeArm.OUT));
+    outtake1.whenReleased(new RunIntake(IntakeArm.STOP));
 
     outtake2 = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_OUTTAKE_2_PORT);
-    outtake2.whenPressed(new RunIntake(Constants.IntakeArm.OUT));
-    outtake2.whenReleased(new RunIntake(Constants.IntakeArm.STOP));
+    outtake2.whenPressed(new RunIntake(IntakeArm.OUT));
+    outtake2.whenReleased(new RunIntake(IntakeArm.STOP));
 
     shooterUp = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_SHOOTER_UP_PORT);