Initialize timer
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / climber / RunWinch.java
index c8b8b8deb03df2bdc561413793b60c3c834bdba1..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;
   }