| 1 | package org.usfirst.frc.team3501.robot; |
| 2 | |
| 3 | <<<<<<< HEAD |
| 4 | import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear; |
| 5 | ======= |
| 6 | import org.usfirst.frc.team3501.robot.commands.accessories.ToggleCameraFeed; |
| 7 | >>>>>>> added command for toggling camera feeds |
| 8 | |
| 9 | import edu.wpi.first.wpilibj.Joystick; |
| 10 | import edu.wpi.first.wpilibj.buttons.Button; |
| 11 | import edu.wpi.first.wpilibj.buttons.JoystickButton; |
| 12 | |
| 13 | public class OI { |
| 14 | private static OI oi; |
| 15 | public static Joystick leftJoystick; |
| 16 | public static Joystick rightJoystick; |
| 17 | public static Button toggleWinch; |
| 18 | |
| 19 | public static Button toggleIndexWheel; |
| 20 | public static Button toggleFlyWheel; |
| 21 | |
| 22 | public static Button toggleCameraFeeds; |
| 23 | |
| 24 | public static Button toggleGear; |
| 25 | |
| 26 | public OI() { |
| 27 | leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); |
| 28 | rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); |
| 29 | toggleWinch = new JoystickButton(leftJoystick, |
| 30 | Constants.OI.TOGGLE_WINCH_PORT); |
| 31 | toggleIndexWheel = new JoystickButton(leftJoystick, |
| 32 | Constants.OI.TOGGLE_INDEXWHEEL_PORT); |
| 33 | toggleFlyWheel = new JoystickButton(leftJoystick, |
| 34 | Constants.OI.TOGGLE_FLYWHEEL_PORT); |
| 35 | <<<<<<< HEAD |
| 36 | toggleGear = new JoystickButton(leftJoystick, |
| 37 | Constants.OI.TOGGLE_GEAR_PORT); |
| 38 | toggleGear.whenPressed(new ToggleGear()); |
| 39 | ======= |
| 40 | |
| 41 | toggleCameraFeeds = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_CAMERA_FEEDS); |
| 42 | |
| 43 | toggleCameraFeeds.whenReleased(new ToggleCameraFeed()); |
| 44 | >>>>>>> added command for toggling camera feeds |
| 45 | } |
| 46 | |
| 47 | public static OI getOI() { |
| 48 | if (oi == null) |
| 49 | oi = new OI(); |
| 50 | return oi; |
| 51 | } |
| 52 | } |