Try to understand why axis camera does turn on while toggling.
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / OI.java
index ec405ac0aeca44daba0e501381b186e0ba476dbe..65f555e15b5b181cc001231c9be31e73e277c51f 100644 (file)
@@ -1,5 +1,6 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.commands.accessories.ToggleCameraFeed;
 import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear;
 
 import edu.wpi.first.wpilibj.Joystick;
@@ -15,6 +16,8 @@ public class OI {
   public static Button toggleIndexWheel;
   public static Button toggleFlyWheel;
 
+  public static Button toggleCameraFeeds;
+
   public static Button toggleGear;
 
   public OI() {
@@ -26,9 +29,16 @@ public class OI {
         Constants.OI.TOGGLE_INDEXWHEEL_PORT);
     toggleFlyWheel = new JoystickButton(leftJoystick,
         Constants.OI.TOGGLE_FLYWHEEL_PORT);
+
     toggleGear = new JoystickButton(leftJoystick,
         Constants.OI.TOGGLE_GEAR_PORT);
     toggleGear.whenPressed(new ToggleGear());
+
+    toggleCameraFeeds = new JoystickButton(leftJoystick,
+        Constants.OI.TOGGLE_CAMERA_FEEDS);
+
+    toggleCameraFeeds.whenReleased(new ToggleCameraFeed());
+
   }
 
   public static OI getOI() {