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);
Robot.driveTrain.turnAngle(angle);
Robot.driveTrain.printGyroOutput();
Robot.driveTrain.printOutput();
- count++;
}