Initialize timer
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / climber / RunWinch.java
index e7e71f30d8a48a484c25628eb917aa3e4fb86f92..2428aff2345244364035e842c40042626d27c74d 100644 (file)
@@ -15,6 +15,10 @@ import edu.wpi.first.wpilibj.command.Command;
  *
  * post-condition: Winch motor set to a specified speed for a specified time.
  *
+ * @param motorVal
+ *          value range is from -1 to 1
+ * @param time
+ *          in seconds
  * @author shivanighanta
  *
  */
@@ -34,6 +38,7 @@ public class RunWinch extends Command {
    */
   public RunWinch(double time, double motorVal) {
     requires(Robot.getDriveTrain());
+    timer = new Timer();
     this.time = time;
     this.motorVal = motorVal;
   }
@@ -57,7 +62,6 @@ public class RunWinch extends Command {
   @Override
   protected void end() {
     Robot.getDriveTrain().stop();
-
   }
 
   @Override