Commit | Line | Data |
---|---|---|
38a404b3 KZ |
1 | package org.usfirst.frc.team3501.robot; |
2 | ||
9cb4e417 | 3 | import org.usfirst.frc.team3501.robot.commands.accessories.ToggleCameraFeed; |
7935bf26 | 4 | |
38a404b3 | 5 | import edu.wpi.first.wpilibj.Joystick; |
de8c65d3 SG |
6 | import edu.wpi.first.wpilibj.buttons.Button; |
7 | import edu.wpi.first.wpilibj.buttons.JoystickButton; | |
38a404b3 KZ |
8 | |
9 | public 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; | |
5bee67e1 | 17 | |
9cb4e417 | 18 | public static Button toggleCameraFeeds; |
2291f7b3 | 19 | |
7935bf26 AD |
20 | public static Button toggleGear; |
21 | ||
38a404b3 KZ |
22 | public OI() { |
23 | leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); | |
24 | rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); | |
93d8373f RH |
25 | /* |
26 | * toggleWinch = new JoystickButton(leftJoystick, | |
27 | * Constants.OI.TOGGLE_WINCH_PORT); toggleIndexWheel = new | |
28 | * JoystickButton(leftJoystick, Constants.OI.TOGGLE_INDEXWHEEL_PORT); | |
29 | * toggleFlyWheel = new JoystickButton(leftJoystick, | |
30 | * Constants.OI.TOGGLE_FLYWHEEL_PORT); | |
31 | * | |
32 | * toggleGear = new JoystickButton(leftJoystick, | |
33 | * Constants.OI.TOGGLE_GEAR_PORT); toggleGear.whenPressed(new ToggleGear()); | |
34 | */ | |
5bee67e1 | 35 | |
c4a90614 RH |
36 | toggleCameraFeeds = new JoystickButton(leftJoystick, |
37 | Constants.OI.TOGGLE_CAMERA_FEEDS); | |
5bee67e1 | 38 | |
9cb4e417 | 39 | toggleCameraFeeds.whenReleased(new ToggleCameraFeed()); |
5c6d9c86 | 40 | System.out.println("toggle ready"); |
38a404b3 | 41 | } |
cf086549 SG |
42 | |
43 | public static OI getOI() { | |
44 | if (oi == null) | |
45 | oi = new OI(); | |
46 | return oi; | |
cca02549 | 47 | } |
38a404b3 | 48 | } |