summaryrefslogtreecommitdiff
path: root/altosui/AltosEepromDelete.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-08 01:47:29 -0700
committerKeith Packard <keithp@keithp.com>2011-08-08 12:13:29 -0700
commit0e3e4f9c1e6a6bf972514f12c9d622258aa2aec2 (patch)
treec84c97e27556d0686bf26ea9e4f1af976cd9b1c7 /altosui/AltosEepromDelete.java
parentf03ca0ab8799bfa5100eaa2577cfd7b9c37d05bf (diff)
altosui: Convert from channels to frequencies
Major areas: * Preferences are stored as frequencies instead of channels * Serial configuration is done using frequencies * UI is presented with frequency lists Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosEepromDelete.java')
-rw-r--r--altosui/AltosEepromDelete.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/altosui/AltosEepromDelete.java b/altosui/AltosEepromDelete.java
index ecd82c18..94951ced 100644
--- a/altosui/AltosEepromDelete.java
+++ b/altosui/AltosEepromDelete.java
@@ -84,11 +84,11 @@ public class AltosEepromDelete implements Runnable {
}
public void run () {
- if (remote)
- serial_line.start_remote();
-
success = false;
try {
+ if (remote)
+ serial_line.start_remote();
+
for (AltosEepromLog log : flights) {
if (log.delete) {
DeleteLog(log);
@@ -103,11 +103,12 @@ public class AltosEepromDelete implements Runnable {
show_error (String.format("Connection to \"%s\" failed",
serial_line.device.toShortString()),
"Connection Failed");
+ } finally {
+ if (remote)
+ serial_line.stop_remote();
+ serial_line.flush_output();
+ serial_line.close();
}
- if (remote)
- serial_line.stop_remote();
- serial_line.flush_output();
- serial_line.close();
if (listener != null) {
Runnable r = new Runnable() {
public void run() {