delete anything to do with pots and motors in IntakeArm and Constants, add the left...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / intakearm / MoveIntakeArmToLevel.java
1 package org.usfirst.frc.team3501.robot.commands.intakearm;
2
3 import org.usfirst.frc.team3501.robot.Constants.IntakeArm;
4 import org.usfirst.frc.team3501.robot.Robot;
5
6 import edu.wpi.first.wpilibj.command.CommandGroup;
7
8 /**
9 * This command group will move the arm to the specified level. Levels
10 * correspond to the angles stored in the potAngles array list saved in the
11 * IntakeArm subsystem. (starting from level 0)
12 *
13 * pre-condition: level >= 0 && level < potAngles.length
14 *
15 * post-condition: arm has moved to specified level
16 *
17 * @author Meryem
18 */
19 public class MoveIntakeArmToLevel extends CommandGroup {
20
21 public MoveIntakeArmToLevel(int level) {
22 requires(Robot.intakeArm);
23
24 if (level < 0 || level >= Robot.intakeArm.potAngles.length)
25 this.end();
26
27 addSequential(new MoveIntakeArmToAngle(Robot.intakeArm.potAngles[level],
28 IntakeArm.DEFAULT_INTAKE_ARM_SPEED));
29
30 }
31 }