Add code for alternating the camera feed
authorRohan Rodrigues <rohanrodrigues19@gmail.com>
Fri, 3 Mar 2017 00:55:26 +0000 (16:55 -0800)
committerRohan Rodrigues <rohanrodrigues19@gmail.com>
Fri, 3 Mar 2017 00:55:26 +0000 (16:55 -0800)
src/org/usfirst/frc/team3501/robot/OI.java

index c608b86b8d1767a8eeab2c2b268693ef6ce74d0e..243e330f5b7b1c041cd6989140d3caf989e2656c 100644 (file)
@@ -32,6 +32,8 @@ public class OI {
   public static Button increaseShooterSpeed;
   public static Button decreaseShooterSpeed;
 
+  private static Button changeCam;
+
   public OI() {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
@@ -70,6 +72,10 @@ public class OI {
     decreaseShooterSpeed = new JoystickButton(leftJoystick,
         Constants.OI.DECREASE_SHOOTER_SPEED_PORT);
     decreaseShooterSpeed.whenPressed(new DecreaseShootingSpeed());
+
+    changeCam = new JoystickButton(rightJoystick,
+        Constants.OI.CHANGE_CAMERA_VIEW);
+    changeCam.toggleWhenPressed(new ChangeCameraView());
   }
 
   public static OI getOI() {