- if (old_state == null || old_state.state != state.state) {
- voice.speak(state.state_name());
- if ((old_state == null || old_state.state <= AltosLib.ao_flight_boost) &&
- state.state > AltosLib.ao_flight_boost) {
- voice.speak("max speed: %s.",
- AltosConvert.speed.say_units(state.max_speed() + 0.5));
+ if (old_state != state.state()) {
+ if (state.state() != AltosLib.ao_flight_stateless)
+ voice.speak(state.state_name());
+ if ((old_state == AltosLib.ao_flight_invalid || old_state <= AltosLib.ao_flight_boost) &&
+ state.state() > AltosLib.ao_flight_boost) {
+ if (state.max_speed() != AltosLib.MISSING)
+ voice.speak("max speed: %s.",
+ AltosConvert.speed.say_units(state.max_speed() + 0.5));