Troubleshooting
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / OI.java
1 package org.usfirst.frc.team3501.robot;
2
3 import org.usfirst.frc.team3501.robot.commands.accessories.ToggleCameraFeed;
4 import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear;
5
6 import edu.wpi.first.wpilibj.Joystick;
7 import edu.wpi.first.wpilibj.buttons.Button;
8 import edu.wpi.first.wpilibj.buttons.JoystickButton;
9
10 public class OI {
11 private static OI oi;
12 public static Joystick leftJoystick;
13 public static Joystick rightJoystick;
14 public static Button toggleWinch;
15
16 public static Button toggleIndexWheel;
17 public static Button toggleFlyWheel;
18
19 public static Button toggleCameraFeeds;
20
21 public static Button toggleGear;
22
23 public OI() {
24 leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
25 rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
26 /*toggleWinch = new JoystickButton(leftJoystick,
27 Constants.OI.TOGGLE_WINCH_PORT);
28 toggleIndexWheel = new JoystickButton(leftJoystick,
29 Constants.OI.TOGGLE_INDEXWHEEL_PORT);
30 toggleFlyWheel = new JoystickButton(leftJoystick,
31 Constants.OI.TOGGLE_FLYWHEEL_PORT);
32
33 toggleGear = new JoystickButton(leftJoystick,
34 Constants.OI.TOGGLE_GEAR_PORT);
35 toggleGear.whenPressed(new ToggleGear());
36 */
37
38 toggleCameraFeeds = new JoystickButton(leftJoystick,
39 Constants.OI.TOGGLE_CAMERA_FEEDS);
40
41 toggleCameraFeeds.whenReleased(new ToggleCameraFeed());
42 System.out.println("toggle ready");
43 }
44
45 public static OI getOI() {
46 if (oi == null)
47 oi = new OI();
48 return oi;
49 }
50 }