X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosEepromDownload.java;h=27bde7995c93f976404062d42fa801c795b55115;hb=6aa99c160f0695eb25ccc0598e4c36224c89dab4;hp=6e2fd061b1cbef6afe1f6ef223a118b95a57782c;hpb=488a527267decece48e6682e0e0c7fc29cbed329;p=fw%2Faltos diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index 6e2fd061..27bde799 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -72,7 +72,7 @@ public class AltosEepromDownload implements Runnable { eeprom_file = new FileWriter(eeprom_name); if (eeprom_file != null) { - monitor.set_file(eeprom_name.getName()); + monitor.set_filename(eeprom_name.getName()); FlushPending(); eeprom_pending = null; } @@ -92,7 +92,7 @@ public class AltosEepromDownload implements Runnable { } } - void CaptureEeprom(AltosEepromChunk eechunk, int log_format) throws IOException { + void CaptureEeprom(AltosEepromChunk eechunk, int log_format) throws IOException, ParseException { boolean any_valid = false; boolean got_flight = false; @@ -138,7 +138,7 @@ public class AltosEepromDownload implements Runnable { CheckFile(false); } - void CaptureLog(AltosEepromLog log) throws IOException, InterruptedException, TimeoutException { + void CaptureLog(AltosEepromLog log) throws IOException, InterruptedException, TimeoutException, ParseException { int block, state_block = 0; int log_format = flights.config_data.log_format; @@ -222,7 +222,11 @@ public class AltosEepromDownload implements Runnable { parse_exception = null; if (log.selected) { monitor.reset(); - CaptureLog(log); + try { + CaptureLog(log); + } catch (ParseException e) { + parse_exception = e; + } } if (parse_exception != null) { failed = true; @@ -294,12 +298,9 @@ public class AltosEepromDownload implements Runnable { flights = given_flights; success = false; - monitor = new AltosEepromMonitor(frame, Altos.ao_flight_boost, Altos.ao_flight_landed); - monitor.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (eeprom_thread != null) - eeprom_thread.interrupt(); - } - }); + monitor = new AltosEepromMonitorUI(given_frame); + monitor.set_states(Altos.ao_flight_boost, Altos.ao_flight_landed); + + monitor.set_thread(eeprom_thread); } }