altosdroid: Make sure flight voice output always starts with 'speed'
authorKeith Packard <keithp@keithp.com>
Wed, 24 Jun 2015 05:04:47 +0000 (22:04 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 24 Jun 2015 05:04:47 +0000 (22:04 -0700)
This resets the flight-mode voice output state back to start again
each time the flight tab is selected

Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java

index 8eb08b9..e876956 100644 (file)
@@ -183,6 +183,9 @@ public class AltosVoice {
                if (state == null)
                        return false;
 
+               if (last_tell_mode != TELL_MODE_FLIGHT)
+                       last_flight_tell = TELL_FLIGHT_NONE;
+
                if (state.state != last_state && AltosLib.ao_flight_boost <= state.state && state.state <= AltosLib.ao_flight_landed) {
                        speak(state.state_name());
                        if (descending(state.state) && !descending(last_state)) {