Commit | Line | Data |
---|---|---|
f11ce98e KZ |
1 | package org.usfirst.frc3501.RiceCatRobot; |
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 { | |
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; | |
15 | ||
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); | |
20 | ||
21 | trigger = new JoystickButton(rightJoystick, RobotMap.TRIGGER_PORT); | |
22 | ||
23 | toggleClaw = new JoystickButton(rightJoystick, RobotMap.TOGGLE_PORT); | |
24 | toggleClaw.whenPressed(new ToggleClaw()); | |
25 | ||
26 | toggleCompressor = new JoystickButton(rightJoystick, | |
27 | RobotMap.TOGGLE_COMPRESSOR_PORT); | |
28 | toggleCompressor.whenPressed(new ToggleCompressor()); | |
29 | } | |
30 | } |