Initialize timer
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / climber / RunWinch.java
index f02ed62510aabf2a731addd2a04f675a009627f8..2428aff2345244364035e842c40042626d27c74d 100644 (file)
@@ -7,7 +7,8 @@ import edu.wpi.first.wpilibj.command.Command;
 
 /**
  * This command runs the winch at a specified speed and time in seconds when the
- * button triggering it is pressed. This command also runs the drive train.
+ * button triggering it is pressed. This command also makes the drive train
+ * motors run because the winch is controlled by the drive train.
  *
  * pre-condition: This command is run by a button in OI. The robot must be
  * attached to the rope.
@@ -37,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;
   }
@@ -60,7 +62,6 @@ public class RunWinch extends Command {
   @Override
   protected void end() {
     Robot.getDriveTrain().stop();
-
   }
 
   @Override