From c0fb2d22f8acbef9e4bf7b38db1157938455d24f Mon Sep 17 00:00:00 2001 From: EvanYap Date: Wed, 20 Jan 2016 20:26:09 -0800 Subject: [PATCH] Add thumb button to send to RioLog/Drive console the current speed of the shooter wheel motor --- src/org/usfirst/frc/team3501/robot/Constants.java | 1 - src/org/usfirst/frc/team3501/robot/OI.java | 3 +++ src/org/usfirst/frc/team3501/robot/commands/ShooterTest.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 1cff6104..f3463078 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -15,7 +15,6 @@ public class Constants { public final static int RIGHT_STICK_LEFT_SILVER_BUTTON = 0; public final static int RIGHT_STICK_RIGHT_SILVER_BUTTON = 0; public final static int RIGHT_STICK_THUMB_BUTTON = 0; - } public static class DriveTrain { diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index 9516b935..1a8b8ab7 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -25,6 +25,9 @@ public class OI { thumbButton = new JoystickButton(rightJoystick, Constants.OI.RIGHT_STICK_THUMB_BUTTON); + thumbButton = new JoystickButton(rightJoystick, + Constants.OI.RIGHT_STICK_THUMB_BUTTON); + } } diff --git a/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java b/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java index c39c863a..44a36868 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java +++ b/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java @@ -26,7 +26,6 @@ public class ShooterTest extends Command { boolean triggerPressed = Robot.oi.rightJoystick.getTrigger(); boolean leftSidePressed = Robot.oi.leftSilverButton.get(); boolean rightSidePressed = Robot.oi.rightSilverButton.get(); - boolean thumbPressed = Robot.oi.thumbButton.get(); double currentWheelSpeed = Robot.shooter.getCurrentSpeed(); @@ -48,6 +47,7 @@ public class ShooterTest extends Command { if (thumbPressed == true) { System.out.println(Robot.shooter.getCurrentSpeed()); } + } // Make this return true when this Command no longer needs to run execute() -- 2.30.2