X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosEepromDownload.java;h=f1abd50cd21b07ecf9dabc03259d1a9b5cfb8fdb;hb=1b8d7313504240ed04e0747e9b0f6e9a83d323e2;hp=5d19acec472987b4a742aaebbb3453734ef80970;hpb=8801b8c1947bd39f7c985b91a2ba8dbc81bcc91a;p=fw%2Faltos diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index 5d19acec..f1abd50c 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -37,11 +37,13 @@ public class AltosEepromDownload implements Runnable { boolean remote; Thread eeprom_thread; AltosEepromMonitor monitor; - int flight = 0; - int year = 0, month = 0, day = 0; - boolean want_file = false; - FileWriter eeprom_file = null; - LinkedList eeprom_pending = new LinkedList(); + + int flight; + int year, month, day; + boolean want_file; + FileWriter eeprom_file; + LinkedList eeprom_pending; + AltosEepromList flights; ActionListener listener; boolean success; @@ -84,6 +86,16 @@ public class AltosEepromDownload implements Runnable { if (flights.config_data.serial == 0) throw new IOException("no serial number found"); + /* Reset per-capture variables */ + flight = 0; + year = 0; + month = 0; + day = 0; + want_file = false; + eeprom_file = null; + eeprom_pending = new LinkedList(); + + /* Set serial number in the monitor dialog window */ monitor.set_serial(flights.config_data.serial); /* Now scan the eeprom, reading blocks of data and converting to .eeprom file form */ @@ -168,7 +180,6 @@ public class AltosEepromDownload implements Runnable { CaptureLog(log); } } - System.out.printf("All flights successfully downloaded\n"); success = true; } catch (IOException ee) { show_error (serial_line.device.toShortString(),