Whoops, didn't see that section of the docs
There's an easy way to do what you want in your situation though.
Code:
public class ScissorToPosition extends Command {
// ...
boolean isUnsafe = false;
public void initialize() {
if(m_setpoint > 70 && Robot.wristPID.getSetpoint() > 30) {
System.out.println("Scissor canceled since wrist > 30");
isUnsafe = true;
} else {
isUnsafe = false;
// init as usual
}
}
// ...
public void execute() {
if(isUnsafe) {
return;
// IMPORTANT. execute() will be called once regardless of isFinished() status
}
// execute as usual
}
public void isFinished() {
if(isUnsafe) {
return true;
}
return Robot.scissorPID.onTarget();
}
}