Commit | Line | Data |
---|---|---|
4b8a525f | 1 | package org.usfirst.frc3501.RiceCatRobot.robot; |
f11ce98e KZ |
2 | |
3 | import org.usfirst.frc3501.RiceCatRobot.commands.ToggleClaw; | |
4 | import org.usfirst.frc3501.RiceCatRobot.commands.ToggleCompressor; | |
5 | ||
6 | import edu.wpi.first.wpilibj.Joystick; | |
7 | import edu.wpi.first.wpilibj.buttons.JoystickButton; | |
8 | ||
9 | public class OI { | |
e3bfff96 KZ |
10 | public static Joystick leftJoystick; |
11 | public static Joystick rightJoystick; | |
12 | public static JoystickButton trigger; | |
13 | public static JoystickButton toggleCompressor; | |
14 | public static JoystickButton toggleClaw; | |
f11ce98e | 15 | |
e3bfff96 KZ |
16 | public OI() { |
17 | System.out.println("OI is open"); | |
18 | leftJoystick = new Joystick(RobotMap.LEFT_STICK_PORT); | |
19 | rightJoystick = new Joystick(RobotMap.RIGHT_STICK_PORT); | |
f11ce98e | 20 | |
e3bfff96 | 21 | trigger = new JoystickButton(rightJoystick, RobotMap.TRIGGER_PORT); |
f11ce98e | 22 | |
e3bfff96 KZ |
23 | toggleClaw = new JoystickButton(rightJoystick, RobotMap.TOGGLE_PORT); |
24 | toggleClaw.whenPressed(new ToggleClaw()); | |
f11ce98e | 25 | |
e3bfff96 KZ |
26 | toggleCompressor = new JoystickButton(rightJoystick, |
27 | RobotMap.TOGGLE_COMPRESSOR_PORT); | |
28 | toggleCompressor.whenPressed(new ToggleCompressor()); | |
b72e169c | 29 | |
e3bfff96 | 30 | } |
b72e169c | 31 | } |