X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosEepromDelete.java;h=73f3a00f06420dd571c61c826081304c34f3c840;hb=55747ce210d7d80d5b4fdaaf9dc7ee0f7bc8b0a3;hp=cd9abfabc02fcf3b00e25f8324cb9f35ca6bd67c;hpb=3ba7b6196f68078f4ed4538c4e7fe30699dfe908;p=fw%2Faltos diff --git a/altosui/AltosEepromDelete.java b/altosui/AltosEepromDelete.java index cd9abfab..73f3a00f 100644 --- a/altosui/AltosEepromDelete.java +++ b/altosui/AltosEepromDelete.java @@ -27,6 +27,7 @@ import java.util.*; import java.text.*; import java.util.prefs.*; import java.util.concurrent.*; +import org.altusmetrum.AltosLib.*; import libaltosJNI.*; @@ -90,7 +91,7 @@ public class AltosEepromDelete implements Runnable { serial_line.start_remote(); for (AltosEepromLog log : flights) { - if (log.delete) { + if (log.selected) { DeleteLog(log); } } @@ -104,10 +105,14 @@ public class AltosEepromDelete implements Runnable { serial_line.device.toShortString()), "Connection Failed"); } finally { - if (remote) - serial_line.stop_remote(); - serial_line.flush_output(); - serial_line.close(); + try { + if (remote) + serial_line.stop_remote(); + } catch (InterruptedException ie) { + } finally { + serial_line.flush_output(); + serial_line.close(); + } } if (listener != null) { Runnable r = new Runnable() {