altosui: Devices with log-format can also delete flights
authorKeith Packard <keithp@keithp.com>
Sun, 14 Aug 2011 04:05:46 +0000 (21:05 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 14 Aug 2011 04:05:46 +0000 (21:05 -0700)
Any device with either flight-log-max or log-format can delete flights.

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

index 94951ced3758c66be524b980643d394accb98fe8..cd9abfabc02fcf3b00e25f8324cb9f35ca6bd67c 100644 (file)
@@ -42,7 +42,7 @@ public class AltosEepromDelete implements Runnable {
        private void DeleteLog (AltosEepromLog log)
                throws IOException, InterruptedException, TimeoutException {
 
-               if (flights.config_data.flight_log_max != 0) {
+               if (flights.config_data.flight_log_max != 0 || flights.config_data.log_format != 0) {
 
                        /* Devices with newer firmware can erase the
                         * flash blocks containing each flight