add multiple diff buttons to save values into diff indexes of potentiometer array...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / intakearm / RecordPotAngle.java
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
12 private static int index;
13
14 public RecordPotAngle(int index) {
15 requires(Robot.intakeArm);
16 this.index = index;
17 }
18
19 // Called just before this Command runs the first time
20 @Override
21 protected void initialize() {
22 Robot.intakeArm.potAngles[index] = Robot.intakeArm.getArmAngle();
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() {
33 return true;
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 }