add stopWinch() method to Scaler to use in RunWinchContinuous
authorLauren Meier <meier.lauren@gmail.com>
Sat, 13 Feb 2016 23:51:26 +0000 (15:51 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Mon, 15 Feb 2016 00:22:19 +0000 (16:22 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/commands/RunWinchContinuous.java
src/org/usfirst/frc/team3501/robot/subsystems/Scaler.java

index e12b1e44373ffa84120f95b9f2eabf75ec8ebe52..65fca516efc02c971de76cbbd46ba2327d25fe32 100644 (file)
@@ -64,6 +64,9 @@ public class Constants {
     // Winch port
     public final static int WINCH_MOTOR = 0;
 
+    // Winch speeds
+    public final static double WINCH_STOP_SPEED = 00;
+
   }
 
   public static class Shooter {
index 63ff149f7d09538480796a16f793023763fb4bd8..304c983aac6a925666a72e322bfb31b1eaad4115 100644 (file)
@@ -18,7 +18,6 @@ import edu.wpi.first.wpilibj.command.Command;
  */
 
 public class RunWinchContinuous extends Command {
-  private final double STOP_SPEED = 0.0;
   private double winchUpSpeed;
 
   public RunWinchContinuous(double speed) {
@@ -42,7 +41,7 @@ public class RunWinchContinuous extends Command {
 
   @Override
   protected void end() {
-    Robot.scaler.runWinch(STOP_SPEED);
+    Robot.scaler.stopWinch();
   }
 
   @Override
index ee7b28da4eb0979250f5cc639927dfbc8f5debfe..c6d400778e523692a5d1ff88449510bc7822a825 100755 (executable)
@@ -45,6 +45,10 @@ public class Scaler extends Subsystem {
     winch.set(speed);
   }
 
+  public void stopWinch() {
+    runWinch(Constants.Scaler.WINCH_STOP_SPEED);
+  }
+
   /***
    * This method returns boolean value true or false on whether piston is
    * extended or not.