projects
/
3501
/
2017steamworks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Create toggle gear button and intialize it in constuctor
[3501/2017steamworks]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
OI.java
diff --git
a/src/org/usfirst/frc/team3501/robot/OI.java
b/src/org/usfirst/frc/team3501/robot/OI.java
index 935c4c6e32eb4da8fb3dbc5590e4f51bfef6aea5..ec405ac0aeca44daba0e501381b186e0ba476dbe 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;
package org.usfirst.frc.team3501.robot;
+import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear;
+
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
@@
-13,6
+15,8
@@
public class OI {
public static Button toggleIndexWheel;
public static Button toggleFlyWheel;
public static Button toggleIndexWheel;
public static Button toggleFlyWheel;
+ public static Button toggleGear;
+
public OI() {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
public OI() {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
@@
-22,6
+26,9
@@
public class OI {
Constants.OI.TOGGLE_INDEXWHEEL_PORT);
toggleFlyWheel = new JoystickButton(leftJoystick,
Constants.OI.TOGGLE_FLYWHEEL_PORT);
Constants.OI.TOGGLE_INDEXWHEEL_PORT);
toggleFlyWheel = new JoystickButton(leftJoystick,
Constants.OI.TOGGLE_FLYWHEEL_PORT);
+ toggleGear = new JoystickButton(leftJoystick,
+ Constants.OI.TOGGLE_GEAR_PORT);
+ toggleGear.whenPressed(new ToggleGear());
}
public static OI getOI() {
}
public static OI getOI() {