protected void measure(){
measMotor.backward();
- while(!measMotor.isStalled()){
+ while(suppressed == SuppressedState.IN_ACTION && !measMotor.isStalled()){
Thread.yield();
}
measMotor.forward();
- while(!measMotor.isStalled()){
+ while(suppressed == SuppressedState.IN_ACTION && !measMotor.isStalled()){
Thread.yield();
}
measMotor.stop(true);
sensors.resetGyro();
rightMotor.backward();
leftMotor.forward();
- while(suppressed != SuppressedState.SUPPRESSED && Math.abs(sensors.gyro()) < angle){
+ while(suppressed == SuppressedState.IN_ACTION && Math.abs(sensors.gyro()) < angle){
Thread.yield();
}
LCDPrinter.print(Float.toString(sensors.gyro()));
sensors.resetGyro();
leftMotor.backward();
rightMotor.forward();
- while(suppressed != SuppressedState.SUPPRESSED && Math.abs(sensors.gyro()) < angle){
+ while(suppressed == SuppressedState.IN_ACTION && Math.abs(sensors.gyro()) < angle){
Thread.yield();
}
LCDPrinter.print(Float.toString(sensors.gyro()));