add compressor on/off
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / OI.java
1 package org.usfirst.frc.team3501.robot;
2
3 import org.usfirst.frc.team3501.robot.commands.*;
4
5 public class OI {
6 private Joystick left, right;
7
8 public OI() {
9 left = new Joystick(RobotMap.LEFT_JOYSTICK_PORT);
10 right = new Joystick(RobotMap.RIGHT_JOYSTICK_PORT);
11
12 right.whenPressed(1, new CloseClaw());
13 right.whenReleased(1, new OpenClaw());
14
15 right.whenPressed(11, new TurnOffCompressor());
16 right.whenPressed(12, new TurnOffCompressor());
17
18 right.whenPressed(7, new TurnOnCompressor());
19 right.whenPressed(8, new TurnOnCompressor());
20 }
21
22 public double getForwardL() {
23 return left.getY();
24 }
25
26 public double getForwardR() {
27 return right.getY();
28 }
29
30 public double getTwistR() {
31 return right.getTwist();
32 }
33 }