Add timer for pistons
authorRohan Rodrigues <rohanrodrigues19@gmail.com>
Fri, 3 Mar 2017 00:36:54 +0000 (16:36 -0800)
committerRohan Rodrigues <rohanrodrigues19@gmail.com>
Fri, 3 Mar 2017 00:36:54 +0000 (16:36 -0800)
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java

index da3fee1cb6bdfaf542cafe339e28d45e568ab90e..34c7e0b4edb4df3a35f671974ee5293d833782f9 100644 (file)
@@ -3,6 +3,7 @@ package org.usfirst.frc.team3501.robot.commands.shooter;
 import org.usfirst.frc.team3501.robot.Robot;
 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
 
+import edu.wpi.first.wpilibj.Timer;
 import edu.wpi.first.wpilibj.command.Command;
 
 /**
@@ -19,6 +20,7 @@ import edu.wpi.first.wpilibj.command.Command;
  */
 public class RunIndexWheelContinuous extends Command {
   private Shooter shooter = Robot.getShooter();
+  private Timer t = new Timer();
 
   /**
    * See JavaDoc comment in class for details
@@ -33,6 +35,7 @@ public class RunIndexWheelContinuous extends Command {
   // Called just before this Command runs the first time
   @Override
   protected void initialize() {
+    t.reset();
   }
 
   // Called repeatedly when this Command is scheduled to run