added command for toggling camera feeds
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / OI.java
index cf71c721b94429dfd41ea6148fb296d924b05541..77791cdd590c182e263a3459c04c31e7428cf2e7 100644 (file)
@@ -1,17 +1,35 @@
 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;
 
 public class OI {
   private static OI oi;
   public static Joystick leftJoystick;
   public static Joystick rightJoystick;
-  public static ClimberButton climberButton;
+  public static Button toggleWinch;
+
+  public static Button toggleIndexWheel;
+  public static Button toggleFlyWheel;
+  
+  public static Button toggleCameraFeeds;
 
   public OI() {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
-
+    toggleWinch = new JoystickButton(leftJoystick,
+        Constants.OI.TOGGLE_WINCH_PORT);
+    toggleIndexWheel = new JoystickButton(leftJoystick,
+        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() {