X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fdriving%2FDriveDistance.java;h=81b6c5c16e8911b4b1daea07edc43e40dd8ed931;hb=adf01f3a7b7f51d8953da6ea5b945a8a00346d38;hp=1eb707c0dae32050dfb7ddcc9ff1681af05bee1e;hpb=fd08522939d60c327411fc06492b60083e68f422;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java b/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java index 1eb707c0..81b6c5c1 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java @@ -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(); } }