*/
public class RecordPotAngle extends Command {
- public RecordPotAngle() {
+ private static int index;
+
+ public RecordPotAngle(int index) {
requires(Robot.intakeArm);
+ this.index = index;
}
// Called just before this Command runs the first time
@Override
protected void initialize() {
- Robot.intakeArm.potAngles[0] = Robot.intakeArm.getArmAngle();
+ Robot.intakeArm.potAngles[index] = Robot.intakeArm.getArmAngle();
}
// Called repeatedly when this Command is scheduled to run
// Make this return true when this Command no longer needs to run execute()
@Override
protected boolean isFinished() {
- return false;
+ return true;
}
// Called once after isFinished returns true