X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosEepromDownload.java;h=64dcdff7032715bcf73977d5710257603f0d358a;hb=313d740b5284b24f1cc7a1ba5779136b55d49ebe;hp=3dd5b12f4794d15dacd38e59274757d27807226e;hpb=a0fb471ce10642fc4a4bd40e4a81f8d6fe7a7c21;p=fw%2Faltos diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index 3dd5b12f..64dcdff7 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -159,6 +159,7 @@ public class AltosEepromDownload implements Runnable { r = new AltosEepromRecord(Altos.AO_LOG_STATE, tiny_tick, state, 0); if (state == Altos.ao_flight_landed) done = true; + state = s; any_valid = true; } else { if (v != 0xffff) @@ -263,11 +264,11 @@ public class AltosEepromDownload implements Runnable { } public void run () { - if (remote) - serial_line.start_remote(); - try { boolean failed = false; + if (remote) + serial_line.start_remote(); + for (AltosEepromLog log : flights) { parse_exception = null; if (log.download) { @@ -294,11 +295,12 @@ public class AltosEepromDownload implements Runnable { serial_line.device.toShortString()), "Connection Failed", JOptionPane.ERROR_MESSAGE); + } finally { + if (remote) + serial_line.stop_remote(); + serial_line.flush_output(); } - if (remote) - serial_line.stop_remote(); monitor.done(); - serial_line.flush_output(); if (listener != null) { Runnable r = new Runnable() { public void run() {