Possible fix and log for autosetarmposition
This commit is contained in:
parent
8a5f7f7877
commit
fc7c6545a4
@ -18,16 +18,14 @@ public class AutoSetArmPosition extends CommandBase {
|
|||||||
protected void execute() {
|
protected void execute() {
|
||||||
mainArm.enable();
|
mainArm.enable();
|
||||||
mainArm.setSetpoint(pos);
|
mainArm.setSetpoint(pos);
|
||||||
System.out.println(pos-mainArm.getDegrees());
|
System.out.println(pos - mainArm.getDegrees());
|
||||||
System.out.println(mainArm.getDegrees());
|
System.out.println(mainArm.getDegrees());
|
||||||
}
|
}
|
||||||
// Make this return true when this Command no longer needs to run execute()
|
// Make this return true when this Command no longer needs to run execute()
|
||||||
protected boolean isFinished() {
|
protected boolean isFinished() {
|
||||||
// Stop when either limit switch is hit
|
// Stop when either limit switch is hit
|
||||||
if(Math.abs(pos-mainArm.getDegrees()) <= 1){
|
System.out.println("AutoSetArmPosition.isFinished(): " + (Math.abs(pos - mainArm.getDegrees()) <= 1));
|
||||||
return false;
|
return Math.abs(pos - mainArm.getDegrees()) <= 1;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
// Called once after isFinished returns true
|
// Called once after isFinished returns true
|
||||||
protected void end() {
|
protected void end() {
|
||||||
|
Loading…
Reference in New Issue
Block a user