From: Keith Packard Date: Thu, 14 Apr 2011 03:27:38 +0000 (-0700) Subject: altosui: oops - lost state changes when downloading eeprom data. X-Git-Tag: 0.9.3~50^2~1 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=a0fb471ce10642fc4a4bd40e4a81f8d6fe7a7c21;hp=7f49d694e776819e03b2c708e1c4ee23ba311430 altosui: oops - lost state changes when downloading eeprom data. This would cause the reader to just keep reading past the end of the flight. Signed-off-by: Keith Packard --- diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index a42f401c..3dd5b12f 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -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 {