added command for toggling camera feeds
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / OI.java
CommitLineData
38a404b3
KZ
1package org.usfirst.frc.team3501.robot;
2
338130b6
AEE
3import org.usfirst.frc.team3501.robot.commands.accessories.ToggleCameraFeed;
4
38a404b3 5import edu.wpi.first.wpilibj.Joystick;
de8c65d3
SG
6import edu.wpi.first.wpilibj.buttons.Button;
7import edu.wpi.first.wpilibj.buttons.JoystickButton;
38a404b3
KZ
8
9public class OI {
cca02549 10 private static OI oi;
38a404b3
KZ
11 public static Joystick leftJoystick;
12 public static Joystick rightJoystick;
83fa645c 13 public static Button toggleWinch;
38a404b3 14
2291f7b3 15 public static Button toggleIndexWheel;
16 public static Button toggleFlyWheel;
338130b6
AEE
17
18 public static Button toggleCameraFeeds;
2291f7b3 19
38a404b3
KZ
20 public OI() {
21 leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
22 rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
de8c65d3
SG
23 toggleWinch = new JoystickButton(leftJoystick,
24 Constants.OI.TOGGLE_WINCH_PORT);
2291f7b3 25 toggleIndexWheel = new JoystickButton(leftJoystick,
26 Constants.OI.TOGGLE_INDEXWHEEL_PORT);
27 toggleFlyWheel = new JoystickButton(leftJoystick,
28 Constants.OI.TOGGLE_FLYWHEEL_PORT);
338130b6
AEE
29
30 toggleCameraFeeds = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_CAMERA_FEEDS);
31
32 toggleCameraFeeds.whenReleased(new ToggleCameraFeed());
38a404b3 33 }
cf086549
SG
34
35 public static OI getOI() {
36 if (oi == null)
37 oi = new OI();
38 return oi;
cca02549 39 }
38a404b3 40}