altosui: oops - lost state changes when downloading eeprom data.
authorKeith Packard <keithp@keithp.com>
Thu, 14 Apr 2011 03:27:38 +0000 (20:27 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 14 Apr 2011 03:27:38 +0000 (20:27 -0700)
This would cause the reader to just keep reading past the end of the
flight.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosEepromDownload.java

index a42f401..3dd5b12 100644 (file)
@@ -155,8 +155,9 @@ public class AltosEepromDownload implements Runnable {
                                int     s = v ^ 0x8000;
 
                                if (Altos.ao_flight_startup <= s && s <= Altos.ao_flight_invalid) {
-                                       r = new AltosEepromRecord(Altos.AO_LOG_STATE, tiny_tick, s, 0);
-                                       if (s == Altos.ao_flight_landed)
+                                       state = s;
+                                       r = new AltosEepromRecord(Altos.AO_LOG_STATE, tiny_tick, state, 0);
+                                       if (state == Altos.ao_flight_landed)
                                                done = true;
                                        any_valid = true;
                                } else {