altosui: Stop parsing eeprom file after hitting 'landed' state
[fw/altos] / ao-tools / altosui / AltosEepromReader.java
index f1d6a6a7d8124b416f0e96246e3dbcf9730ba82e..4cc8536a64a22bf889b35e26e6bc1e6d6ca9dcb1 100644 (file)
@@ -391,6 +391,11 @@ public class AltosEepromReader extends AltosReader {
                                        }
                                }
                                records.add(record);
+
+                               /* Bail after reading the 'landed' record; we're all done */
+                               if (record.cmd == Altos.AO_LOG_STATE &&
+                                   record.a == Altos.ao_flight_landed)
+                                       break;
                        }
                } catch (IOException io) {
                } catch (ParseException pe) {