code review changes and add code for braking cantalons
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / OI.java
index c608b86b8d1767a8eeab2c2b268693ef6ce74d0e..a1abe0ad63a7b3e3a1fd22c450c5b547402d0a71 100644 (file)
@@ -1,6 +1,7 @@
 package org.usfirst.frc.team3501.robot;
 
-import org.usfirst.frc.team3501.robot.commands.climber.ToggleWinch;
+import org.usfirst.frc.team3501.robot.commands.driving.BrakeCANTalons;
+import org.usfirst.frc.team3501.robot.commands.driving.CoastCANTalons;
 import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear;
 import org.usfirst.frc.team3501.robot.commands.intake.ReverseIntakeContinuous;
 import org.usfirst.frc.team3501.robot.commands.intake.RunIntakeContinuous;
@@ -18,7 +19,6 @@ public class OI {
   private static OI oi;
   public static Joystick leftJoystick;
   public static Joystick rightJoystick;
-  public static Button toggleWinch;
 
   public static Button runIndexWheel;
   public static Button reverseIndexWheel;
@@ -32,6 +32,9 @@ public class OI {
   public static Button increaseShooterSpeed;
   public static Button decreaseShooterSpeed;
 
+  public static Button brakeCANTalons;
+  public static Button coastCANTalons;
+
   public OI() {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
@@ -59,10 +62,6 @@ public class OI {
         Constants.OI.REVERSE_INTAKE_PORT);
     reverseIntake.whileHeld(new ReverseIntakeContinuous());
 
-    toggleWinch = new JoystickButton(leftJoystick,
-        Constants.OI.TOGGLE_WINCH_PORT);
-    toggleWinch.whenPressed(new ToggleWinch());
-
     increaseShooterSpeed = new JoystickButton(leftJoystick,
         Constants.OI.INCREASE_SHOOTER_SPEED_PORT);
     increaseShooterSpeed.whenPressed(new IncreaseShootingSpeed());
@@ -70,6 +69,14 @@ public class OI {
     decreaseShooterSpeed = new JoystickButton(leftJoystick,
         Constants.OI.DECREASE_SHOOTER_SPEED_PORT);
     decreaseShooterSpeed.whenPressed(new DecreaseShootingSpeed());
+
+    brakeCANTalons = new JoystickButton(rightJoystick,
+        Constants.OI.BRAKE_CANTALONS_PORT);
+    brakeCANTalons.whenPressed(new BrakeCANTalons());
+
+    coastCANTalons = new JoystickButton(rightJoystick,
+        Constants.OI.COAST_CANTALONS_PORT);
+    coastCANTalons.whenPressed(new CoastCANTalons());
   }
 
   public static OI getOI() {