From: EvanYap Date: Fri, 22 Jan 2016 02:46:55 +0000 (-0800) Subject: Fix variable names X-Git-Url: http://challenge-bot.com/repos/?a=commitdiff_plain;h=8a3948435823ea5cd600f68fbbd19341f57c5758;hp=3924f4c23d4b09a97a8866602d884d3acf9a3a62;p=3501%2Fstronghold-2016 Fix variable names --- diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index f3463078..3d05b3f3 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -10,11 +10,11 @@ public class Constants { public static class OI { public final static int LEFT_STICK_PORT = 0; public final static int RIGHT_STICK_PORT = 0; - public final static int RIGHT_STICK_TRIGGER = 0; + public final static int TRIGGER_PORT = 0; - 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 final static int DECREMENT_SHOOTER_PORT = 0; + public final static int INCREMENT_SHOOTER_PORT = 0; + public final static int SHOOTER_PORT = 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 d24eb3ab..d644cf71 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -7,22 +7,25 @@ import edu.wpi.first.wpilibj.buttons.JoystickButton; public class OI { public static Joystick leftJoystick; public static Joystick rightJoystick; - public static Button leftSilverButton; - public static Button rightSilverButton; - public static Button thumbButton; + public static Button decrementSpeed; + public static Button incrementSpeed; + public static Button outputCurrentShooterSpeed; + public static Button runWheel; public OI() { leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); - leftSilverButton = new JoystickButton(rightJoystick, - Constants.OI.RIGHT_STICK_LEFT_SILVER_BUTTON); + decrementSpeed = new JoystickButton(rightJoystick, + Constants.OI.DECREMENT_SHOOTER_PORT); - rightSilverButton = new JoystickButton(rightJoystick, - Constants.OI.RIGHT_STICK_RIGHT_SILVER_BUTTON); + incrementSpeed = new JoystickButton(rightJoystick, + Constants.OI.INCREMENT_SHOOTER_PORT); - thumbButton = new JoystickButton(rightJoystick, - Constants.OI.RIGHT_STICK_THUMB_BUTTON); + outputCurrentShooterSpeed = new JoystickButton(rightJoystick, + Constants.OI.SHOOTER_PORT); + + runWheel = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT); } diff --git a/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java b/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java deleted file mode 100644 index 07593250..00000000 --- a/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.usfirst.frc.team3501.robot.commands; - -import org.usfirst.frc.team3501.robot.Robot; - -import edu.wpi.first.wpilibj.command.Command; - -/** - * - */ -public class ShooterTest extends Command { - - public ShooterTest() { - - requires(Robot.shooter); - } - - @Override - protected void initialize() { - Robot.shooter.setSpeed(0.5); - - } - - @Override - protected void execute() { - 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(); - - if (triggerPressed == true) { - Robot.shooter.setSpeed(currentWheelSpeed); - } else { - Robot.shooter.setSpeed(0.0); - } - - if (leftSidePressed == true) { - Robot.shooter.decrementSpeed(0.1); - } - - if (rightSidePressed == true) { - Robot.shooter.incrementSpeed(0.1); - } - - if (thumbPressed == true) { - System.out.println(Robot.shooter.getCurrentSpeed()); - } - - } - - // Make this return true when this Command no longer needs to run execute() - @Override - protected boolean isFinished() { - return false; - } - - // Called once after isFinished returns true - @Override - protected void end() { - } - - // Called when another command which requires one or more of the same - // subsystems is scheduled to run - @Override - protected void interrupted() { - } -}