add end() in interrupted in scaler methods and make sure constants go in the right...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / scaler / ClampBar.java
index 9e9fbc1ba621913747c3d3225a62623aad8ca9ea..23b010f1d786eaa2be8583237b75a1d1b76de23e 100755 (executable)
@@ -1,21 +1,21 @@
 package org.usfirst.frc.team3501.robot.commands.scaler;
 
+import org.usfirst.frc.team3501.robot.Constants;
 import org.usfirst.frc.team3501.robot.Robot;
 
 import edu.wpi.first.wpilibj.command.Command;
 
 public class ClampBar extends Command {
-  private double secondsToClamp = 2.0; // seconds for the winch to run in order
-                                       // for it to clamp(requires testing)
-  private double winchSpeed = 0.5; // requires testing
+  private double speed = 0;
 
-  public ClampBar() {
+  public ClampBar(double speed) {
+    this.speed = speed;
   }
 
   @Override
   protected void initialize() {
-    setTimeout(secondsToClamp);
-    Robot.scaler.runWinch(winchSpeed);
+    setTimeout(Constants.Scaler.SECONDS_TO_CLAMP);
+    Robot.scaler.runWinch(this.speed);
   }
 
   @Override