projects
/
3501
/
stronghold-2016
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
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
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/intakearm/RecordPotAngle.java
b/src/org/usfirst/frc/team3501/robot/commands/intakearm/RecordPotAngle.java
index bb9a01208457c11e654a2d87040573f06af86b57..589bcb7358f1ad601b7304f633bc2c2601e52def 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/intakearm/RecordPotAngle.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/intakearm/RecordPotAngle.java
@@
-9,14
+9,17
@@
import edu.wpi.first.wpilibj.command.Command;
*/
public class RecordPotAngle extends Command {
*/
public class RecordPotAngle extends Command {
- public RecordPotAngle() {
+ private static int index;
+
+ public RecordPotAngle(int index) {
requires(Robot.intakeArm);
requires(Robot.intakeArm);
+ this.index = index;
}
// Called just before this Command runs the first time
@Override
protected void initialize() {
}
// 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
}
// Called repeatedly when this Command is scheduled to run
@@
-27,7
+30,7
@@
public class RecordPotAngle extends Command {
// Make this return true when this Command no longer needs to run execute()
@Override
protected boolean isFinished() {
// Make this return true when this Command no longer needs to run execute()
@Override
protected boolean isFinished() {
- return
fals
e;
+ return
tru
e;
}
// Called once after isFinished returns true
}
// Called once after isFinished returns true