Add comments to all of the driveTrain PID commands and methods to explain what is...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / driving / DriveDistance.java
index 1eb707c0dae32050dfb7ddcc9ff1681af05bee1e..81b6c5c16e8911b4b1daea07edc43e40dd8ed931 100644 (file)
@@ -6,13 +6,18 @@ import org.usfirst.frc.team3501.robot.Robot;
 import edu.wpi.first.wpilibj.command.Command;
 
 /***
- * This command will move the robot at the specified speed for the specified
- * distance.
+ * This command will drive the drivetrain a certain distance in inches
  *
- * post-condition: has driven for the distance and speed specified
- *
- * @author Meryem and Avi
+ * @param distance
+ *          is the distance we want to drive
+ *          maxTimeOut is a catch just in case the robot malfunctions and never
+ *          gets to the setpoint
  *
+ * @code
+ *       Repeatedly updates the driveTrain setpoint
+ *       Finishes when the time goes over maxTimeOut or the driveTrain hits the
+ *       setpoint
+ *       end() disables the PID driveTrain
  */
 public class DriveDistance extends Command {
   private double maxTimeOut;
@@ -55,6 +60,5 @@ public class DriveDistance extends Command {
 
   @Override
   protected void interrupted() {
-    end();
   }
 }