altosui: Stop downloading mega eeprom on empty block
authorKeith Packard <keithp@keithp.com>
Mon, 27 May 2013 00:50:10 +0000 (18:50 -0600)
committerKeith Packard <keithp@keithp.com>
Mon, 27 May 2013 00:50:10 +0000 (18:50 -0600)
Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosEepromDownload.java

index 53d5433f0146e45aa19756f4ae13b1a5ebe2526f..dc61724d61f1323882493c3e49f163361b303bf5 100644 (file)
@@ -289,7 +289,8 @@ public class AltosEepromDownload implements Runnable {
 
                                if (r.cmd == Altos.AO_LOG_STATE && r.data16(0) == Altos.ao_flight_landed)
                                        done = true;
-                               any_valid = true;
+                               if (r.cmd != AltosLib.AO_LOG_INVALID)
+                                       any_valid = true;
                                LogMega(r);
                        } catch (ParseException pe) {
                                if (parse_exception == null)