Possible fix and log for autosetarmposition

This commit is contained in:
Austen Adler 2016-09-22 10:19:48 -04:00
parent 8a5f7f7877
commit fc7c6545a4
No known key found for this signature in database
GPG Key ID: 7ECEE590CCDFE3F1

View File

@ -18,16 +18,14 @@ public class AutoSetArmPosition extends CommandBase {
protected void execute() {
mainArm.enable();
mainArm.setSetpoint(pos);
System.out.println(pos-mainArm.getDegrees());
System.out.println(pos - mainArm.getDegrees());
System.out.println(mainArm.getDegrees());
}
// Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() {
// Stop when either limit switch is hit
if(Math.abs(pos-mainArm.getDegrees()) <= 1){
return false;
}
return false;
System.out.println("AutoSetArmPosition.isFinished(): " + (Math.abs(pos - mainArm.getDegrees()) <= 1));
return Math.abs(pos - mainArm.getDegrees()) <= 1;
}
// Called once after isFinished returns true
protected void end() {