Commit | Line | Data |
---|---|---|
38a404b3 KZ |
1 | package org.usfirst.frc.team3501.robot; |
2 | ||
571a0e2a HD |
3 | import org.usfirst.frc.team3501.robot.commands.driving.SetHighGear; |
4 | import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear; | |
5 | import org.usfirst.frc.team3501.robot.commands.driving.ToggleFront; | |
6 | import org.usfirst.frc.team3501.robot.commands.intakearm.RunIntake; | |
7 | import org.usfirst.frc.team3501.robot.commands.intakearm.StopIntake; | |
6b06b2bc | 8 | import org.usfirst.frc.team3501.robot.commands.shooter.Shoot; |
571a0e2a HD |
9 | import org.usfirst.frc.team3501.robot.subsystems.IntakeArm; |
10 | ||
37e5a121 | 11 | |
38a404b3 | 12 | import edu.wpi.first.wpilibj.Joystick; |
cb3389eb E |
13 | import edu.wpi.first.wpilibj.buttons.Button; |
14 | import edu.wpi.first.wpilibj.buttons.JoystickButton; | |
38a404b3 KZ |
15 | |
16 | public class OI { | |
17 | public static Joystick leftJoystick; | |
18 | public static Joystick rightJoystick; | |
6b06b2bc | 19 | |
6b06b2bc | 20 | // left joystick buttons |
571a0e2a | 21 | public static Button gearTrigger; |
6b06b2bc CZ |
22 | |
23 | // right joystick buttons | |
571a0e2a | 24 | public static Button intakeTrigger; |
6b06b2bc | 25 | public static Button shootBoulder; |
571a0e2a | 26 | public static Button toggleFront; |
38a404b3 KZ |
27 | |
28 | public OI() { | |
29 | leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); | |
30 | rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); | |
31 | ||
571a0e2a HD |
32 | // Left joystick |
33 | gearTrigger = new JoystickButton(leftJoystick, | |
6b06b2bc | 34 | Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT); |
571a0e2a HD |
35 | gearTrigger.whenPressed(new SetHighGear()); |
36 | gearTrigger.whenReleased(new SetLowGear()); | |
52ef246c | 37 | |
571a0e2a HD |
38 | // Right joystick |
39 | intakeTrigger = new JoystickButton(rightJoystick, | |
6b06b2bc | 40 | Constants.OI.RIGHT_JOYSTICK_TRIGGER_PORT); |
571a0e2a HD |
41 | intakeTrigger.whenPressed(new RunIntake()); |
42 | intakeTrigger.whenReleased(new StopIntake()); | |
6b06b2bc | 43 | |
571a0e2a HD |
44 | shootBoulder = new JoystickButton(rightJoystick, |
45 | Constants.OI.RIGHT_JOYSTICK_SHOOT_PORT); | |
46 | shootBoulder.whenPressed(new Shoot()); | |
7a949394 | 47 | |
571a0e2a HD |
48 | toggleFront = new JoystickButton(rightJoystick, |
49 | Constants.OI.RIGHT_JOYSTICK_THUMB_PORT); | |
50 | toggleFront.whenPressed(new ToggleFront()); | |
38a404b3 KZ |
51 | } |
52 | } |