f573281d6b4a7bb86328cfec799991cfa8826734
1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commands
.*;
6 private Joystick left
, right
;
9 left
= new Joystick(RobotMap
.LEFT_JOYSTICK_PORT
);
10 right
= new Joystick(RobotMap
.RIGHT_JOYSTICK_PORT
);
12 right
.whenPressed(1, new CloseClaw());
13 right
.whenReleased(1, new OpenClaw());
15 right
.whenPressed(2, new ToggleClaw());
17 right
.whenPressed(11, new TurnOffCompressor());
18 right
.whenPressed(12, new TurnOffCompressor());
20 right
.whenPressed(7, new TurnOnCompressor());
21 right
.whenPressed(8, new TurnOnCompressor());
23 // potential bug point: this should "Just Work" because as soon as
24 // command stops running, left stick pos at 0 should take over...
25 // if that is not the case, arm will continue indefinitely.
26 left
.whileHeld(7, new TensionLeftWinch(RobotMap
.ARM_ADJUST_SPEED
));
27 left
.whileHeld(6, new TensionLeftWinch(-RobotMap
.ARM_ADJUST_SPEED
));
28 left
.whileHeld(11, new TensionRightWinch(RobotMap
.ARM_ADJUST_SPEED
));
29 left
.whileHeld(10, new TensionRightWinch(-RobotMap
.ARM_ADJUST_SPEED
));
32 public double getForwardL() {
36 public double getForwardR() {
40 public double getTwistR() {
41 return right
.getTwist();