Commit | Line | Data |
---|---|---|
38a404b3 KZ |
1 | package org.usfirst.frc.team3501.robot; |
2 | ||
5bee67e1 | 3 | |
72beefff | 4 | |
7935bf26 | 5 | import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear; |
9cb4e417 AEE |
6 | ======= |
7 | import org.usfirst.frc.team3501.robot.commands.accessories.ToggleCameraFeed; | |
8 | >>>>>>> added command for toggling camera feeds | |
72beefff | 9 | ======= |
338130b6 | 10 | import org.usfirst.frc.team3501.robot.commands.accessories.ToggleCameraFeed; |
72beefff | 11 | >>>>>>> cb0f662264528bcb0d783fcb00db22eb8d4f4283 |
7935bf26 | 12 | |
38a404b3 | 13 | import edu.wpi.first.wpilibj.Joystick; |
de8c65d3 SG |
14 | import edu.wpi.first.wpilibj.buttons.Button; |
15 | import edu.wpi.first.wpilibj.buttons.JoystickButton; | |
38a404b3 KZ |
16 | |
17 | public class OI { | |
cca02549 | 18 | private static OI oi; |
38a404b3 KZ |
19 | public static Joystick leftJoystick; |
20 | public static Joystick rightJoystick; | |
83fa645c | 21 | public static Button toggleWinch; |
38a404b3 | 22 | |
2291f7b3 | 23 | public static Button toggleIndexWheel; |
24 | public static Button toggleFlyWheel; | |
5bee67e1 | 25 | |
9cb4e417 | 26 | public static Button toggleCameraFeeds; |
2291f7b3 | 27 | |
338130b6 | 28 | public static Button toggleCameraFeeds; |
2291f7b3 | 29 | |
7935bf26 AD |
30 | public static Button toggleGear; |
31 | ||
38a404b3 KZ |
32 | public OI() { |
33 | leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); | |
34 | rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); | |
de8c65d3 SG |
35 | toggleWinch = new JoystickButton(leftJoystick, |
36 | Constants.OI.TOGGLE_WINCH_PORT); | |
2291f7b3 | 37 | toggleIndexWheel = new JoystickButton(leftJoystick, |
38 | Constants.OI.TOGGLE_INDEXWHEEL_PORT); | |
39 | toggleFlyWheel = new JoystickButton(leftJoystick, | |
40 | Constants.OI.TOGGLE_FLYWHEEL_PORT); | |
5bee67e1 | 41 | |
72beefff | 42 | |
7935bf26 AD |
43 | toggleGear = new JoystickButton(leftJoystick, |
44 | Constants.OI.TOGGLE_GEAR_PORT); | |
45 | toggleGear.whenPressed(new ToggleGear()); | |
5bee67e1 RH |
46 | |
47 | ||
9cb4e417 | 48 | toggleCameraFeeds = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_CAMERA_FEEDS); |
5bee67e1 | 49 | |
9cb4e417 | 50 | toggleCameraFeeds.whenReleased(new ToggleCameraFeed()); |
5bee67e1 | 51 | |
72beefff RH |
52 | |
53 | ||
54 | toggleCameraFeeds = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_CAMERA_FEEDS); | |
55 | ||
56 | toggleCameraFeeds.whenReleased(new ToggleCameraFeed()); | |
57 | ||
38a404b3 | 58 | } |
cf086549 SG |
59 | |
60 | public static OI getOI() { | |
61 | if (oi == null) | |
62 | oi = new OI(); | |
63 | return oi; | |
cca02549 | 64 | } |
38a404b3 | 65 | } |