Commit | Line | Data |
---|---|---|
38a404b3 KZ |
1 | package org.usfirst.frc.team3501.robot; |
2 | ||
b87f9700 E |
3 | import org.usfirst.frc.team3501.robot.commands.runShooter; |
4 | import org.usfirst.frc.team3501.robot.commands.setShooterSpeed; | |
47ce2b09 | 5 | |
38a404b3 | 6 | import edu.wpi.first.wpilibj.Joystick; |
cb3389eb E |
7 | import edu.wpi.first.wpilibj.buttons.Button; |
8 | import edu.wpi.first.wpilibj.buttons.JoystickButton; | |
38a404b3 KZ |
9 | |
10 | public class OI { | |
11 | public static Joystick leftJoystick; | |
12 | public static Joystick rightJoystick; | |
8a394843 E |
13 | public static Button decrementSpeed; |
14 | public static Button incrementSpeed; | |
15 | public static Button outputCurrentShooterSpeed; | |
16 | public static Button runWheel; | |
38a404b3 KZ |
17 | |
18 | public OI() { | |
19 | leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); | |
20 | rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); | |
21 | ||
8a394843 E |
22 | decrementSpeed = new JoystickButton(rightJoystick, |
23 | Constants.OI.DECREMENT_SHOOTER_PORT); | |
b87f9700 | 24 | decrementSpeed.whenPressed(new setShooterSpeed(-0.1)); |
cb3389eb | 25 | |
8a394843 E |
26 | incrementSpeed = new JoystickButton(rightJoystick, |
27 | Constants.OI.INCREMENT_SHOOTER_PORT); | |
b87f9700 | 28 | incrementSpeed.whenPressed(new setShooterSpeed(0.1)); |
7a949394 | 29 | |
8a394843 E |
30 | outputCurrentShooterSpeed = new JoystickButton(rightJoystick, |
31 | Constants.OI.SHOOTER_PORT); | |
32 | ||
33 | runWheel = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT); | |
b87f9700 | 34 | runWheel.whenPressed(new runShooter()); |
38a404b3 | 35 | } |
cb3389eb | 36 | |
38a404b3 | 37 | } |