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 / TurnForAngle.java
index f9e5e890be195df4a417cbb05e89580aadca3ead..2362b89b10edc59159dba1c3371997349243eae4 100755 (executable)
@@ -6,18 +6,17 @@ 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.
- *
- * post-condition: has driven for the distance and speed specified
- *
- * @author Meryem and Avi
- *
+ * @param angle
+ *          is the setpoint we want to turn for
+ *          maxTimeOut catch just in case robot malfunctions and never reaches
+ *          setpoint
+ * @initialize resets the Gyro and prints the current mode
+ * @code repeatedly sets a new setpoint angle to the motor
+ * @end ends when the setpoint is reached.
  */
 public class TurnForAngle extends Command {
   private double maxTimeOut;
   double angle;
-  int count = 0;
 
   public TurnForAngle(double angle, double maxTimeOut) {
     requires(Robot.driveTrain);
@@ -36,7 +35,6 @@ public class TurnForAngle extends Command {
     Robot.driveTrain.turnAngle(angle);
     Robot.driveTrain.printGyroOutput();
     Robot.driveTrain.printOutput();
-    count++;
 
   }