| 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 | |
| 16 | public double getForwardL() { |
| 17 | return left.getY(); |
| 18 | } |
| 19 | |
| 20 | public double getForwardR() { |
| 21 | return right.getY(); |
| 22 | } |
| 23 | |
| 24 | public double getTwistR() { |
| 25 | return right.getTwist(); |
| 26 | } |
| 27 | } |