From 7099e02a8b14f48b551bef594b71a4bb3d6c5b8d Mon Sep 17 00:00:00 2001 From: shainachen Date: Sat, 14 Jan 2017 16:30:13 -0800 Subject: [PATCH] Add buttons to OI class --- src/org/usfirst/frc/team3501/robot/Constants.java | 2 ++ .../team3501/robot/commands/shooter/RunFlyWheelContinuous.java | 2 +- .../robot/commands/shooter/RunIndexWheelContinuous.java | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index 95d4ba1..df33dfc 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -19,6 +19,8 @@ public class Constants { // MOTOR CONTROLLERS public static final int FLY_WHEEL = 0; public static final int INDEX_WHEEL = 0; + public final static int TOGGLE_FLYWHEEL_PORT = 0; + public final static int TOGGLE_INDEXWHEEL_PORT = 0; } public static class DriveTrain { diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java index ca5f90d..cc07893 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java @@ -54,7 +54,7 @@ public class RunFlyWheelContinuous extends Command { @Override protected boolean isFinished() { - return false; + return !Robot.getOI().toggleFlyWheel.get(); } } diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java index 2a5ccbe..83b66c0 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java @@ -54,7 +54,7 @@ public class RunIndexWheelContinuous extends Command { @Override protected boolean isFinished() { - return false; + return Robot.getOI().toggleIndexWheel.get(); } } -- 2.30.2