projects
/
3501
/
stronghold-2016
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b792da4
)
Set buttons in OI to run changeSpeed command when pressed
author
EvanYap
<evanyap.14@gmail.com>
Fri, 22 Jan 2016 03:00:37 +0000
(19:00 -0800)
committer
Kevin Zhang
<icestormf1@gmail.com>
Sat, 23 Jan 2016 03:37:35 +0000
(19:37 -0800)
src/org/usfirst/frc/team3501/robot/OI.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/OI.java
b/src/org/usfirst/frc/team3501/robot/OI.java
index d644cf7188d0fc6aa53454f5674bf31506fd06c7..4367d6ae50ea68a7b3d2bda87707e826c42abc7a 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/OI.java
+++ b/
src/org/usfirst/frc/team3501/robot/OI.java
@@
-1,5
+1,7
@@
package org.usfirst.frc.team3501.robot;
+import org.usfirst.frc.team3501.robot.commands.changeSpeed;
+
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
@@
-27,6
+29,10
@@
public class OI {
runWheel = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT);
+ incrementSpeed.whenPressed(new changeSpeed(0.1));
+
+ decrementSpeed.whenPressed(new changeSpeed(-0.1));
+
}
}