add default speed for shooter in constants, and apply in runShooter command
authorCindy Zhang <cindyzyx9@gmail.com>
Thu, 18 Feb 2016 20:56:29 +0000 (12:56 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Thu, 18 Feb 2016 22:02:42 +0000 (14:02 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/commands/shooter/runShooter.java

index 37f77e41abe42387f2926cc024eb2c2be93a8eb9..862459d6fcfdf411ac52cea1a5514de277d2ba59 100644 (file)
@@ -112,6 +112,8 @@ public class Constants {
     public static final int HOOD_FORWARD = 2;
     public static final int HOOD_REVERSE = 3;
 
+    public static final double DEFAULT_SHOOTER_SPEED = 0.5;
+
     public static final Value open = Value.kReverse;
     public static final Value closed = Value.kForward;
 
index 4315ae1932da88e38dbf6cab3fdf09705e9da09c..c7b0cf2fca40fd7e83c0b887c83b5e854a887080 100644 (file)
@@ -1,5 +1,6 @@
 package org.usfirst.frc.team3501.robot.commands.shooter;
 
+import org.usfirst.frc.team3501.robot.Constants;
 import org.usfirst.frc.team3501.robot.Robot;
 
 import edu.wpi.first.wpilibj.command.Command;
@@ -15,7 +16,7 @@ public class runShooter extends Command {
 
   @Override
   protected void initialize() {
-    Robot.shooter.setSpeed(0.5);
+    Robot.shooter.setSpeed(Constants.Shooter.DEFAULT_SHOOTER_SPEED);
   }
 
   @Override