Commit | Line | Data |
---|---|---|
3004ae83 CZ |
1 | package org.usfirst.frc.team3501.robot.commands.intakearm; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.Robot; | |
4 | ||
5 | import edu.wpi.first.wpilibj.command.Command; | |
6 | ||
7 | /** | |
8 | * | |
9 | */ | |
10 | public class RecordPotAngle extends Command { | |
11 | ||
7ccd0b7a CZ |
12 | private static int index; |
13 | ||
14 | public RecordPotAngle(int index) { | |
3004ae83 | 15 | requires(Robot.intakeArm); |
7ccd0b7a | 16 | this.index = index; |
3004ae83 CZ |
17 | } |
18 | ||
19 | // Called just before this Command runs the first time | |
20 | @Override | |
21 | protected void initialize() { | |
7ccd0b7a | 22 | Robot.intakeArm.potAngles[index] = Robot.intakeArm.getArmAngle(); |
3004ae83 CZ |
23 | } |
24 | ||
25 | // Called repeatedly when this Command is scheduled to run | |
26 | @Override | |
27 | protected void execute() { | |
28 | } | |
29 | ||
30 | // Make this return true when this Command no longer needs to run execute() | |
31 | @Override | |
32 | protected boolean isFinished() { | |
7ccd0b7a | 33 | return true; |
3004ae83 CZ |
34 | } |
35 | ||
36 | // Called once after isFinished returns true | |
37 | @Override | |
38 | protected void end() { | |
39 | } | |
40 | ||
41 | // Called when another command which requires one or more of the same | |
42 | // subsystems is scheduled to run | |
43 | @Override | |
44 | protected void interrupted() { | |
45 | } | |
46 | } |