added command for toggling camera feeds
authorAndres Esteban Echeverria G <estebanech@Andress-MacBook-Air.local>
Sun, 5 Feb 2017 01:09:59 +0000 (17:09 -0800)
committerAndres Esteban Echeverria G <estebanech@Andress-MacBook-Air.local>
Sun, 5 Feb 2017 01:09:59 +0000 (17:09 -0800)
src/org/usfirst/frc/team3501/robot/OI.java

index 935c4c6e32eb4da8fb3dbc5590e4f51bfef6aea5..77791cdd590c182e263a3459c04c31e7428cf2e7 100644 (file)
@@ -1,5 +1,7 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.commands.accessories.ToggleCameraFeed;
+
 import edu.wpi.first.wpilibj.Joystick;
 import edu.wpi.first.wpilibj.buttons.Button;
 import edu.wpi.first.wpilibj.buttons.JoystickButton;
@@ -12,6 +14,8 @@ public class OI {
 
   public static Button toggleIndexWheel;
   public static Button toggleFlyWheel;
+  
+  public static Button toggleCameraFeeds;
 
   public OI() {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
@@ -22,6 +26,10 @@ public class OI {
         Constants.OI.TOGGLE_INDEXWHEEL_PORT);
     toggleFlyWheel = new JoystickButton(leftJoystick,
         Constants.OI.TOGGLE_FLYWHEEL_PORT);
+    
+    toggleCameraFeeds = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_CAMERA_FEEDS);
+    
+    toggleCameraFeeds.whenReleased(new ToggleCameraFeed());
   }
 
   public static OI getOI() {