X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosEepromDownload.java;h=e7e52466b71b24cd577036e18b51dde4bcf8a3e7;hb=c1e293ff4953b51c19af8b52f2999419ea84e7e5;hp=6112a3b1cdce943febb0e87eb8b2d247ee71ad08;hpb=03e201e1acc8742399054e4ad36b533120ea1612;p=fw%2Faltos diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index 6112a3b1..e7e52466 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -248,6 +248,10 @@ public class AltosEepromDownload implements Runnable { done = true; } + void CaptureTelemetry(AltosEepromChunk eechunk) throws IOException { + + } + void CaptureLog(AltosEepromLog log) throws IOException, InterruptedException, TimeoutException { int block, state_block = 0; int log_format = flights.config_data.log_format; @@ -275,7 +279,7 @@ public class AltosEepromDownload implements Runnable { for (block = log.start_block; !done && block < log.end_block; block++) { monitor.set_value(Altos.state_to_string[state], state, block - state_block); - AltosEepromChunk eechunk = new AltosEepromChunk(serial_line, block); + AltosEepromChunk eechunk = new AltosEepromChunk(serial_line, block, block == log.start_block); /* * Guess what kind of data is there if the device @@ -300,10 +304,10 @@ public class AltosEepromDownload implements Runnable { extension = "eeprom"; CaptureTiny(eechunk); break; -// case Altos.AO_LOG_FORMAT_TELEMETRY: -// extension = "telem"; -// CaptureTelemetry(eechunk); -// break; + case Altos.AO_LOG_FORMAT_TELEMETRY: + extension = "telem"; + CaptureTelemetry(eechunk); + break; case Altos.AO_LOG_FORMAT_TELESCIENCE: extension = "science"; CaptureTeleScience(eechunk); @@ -373,8 +377,12 @@ public class AltosEepromDownload implements Runnable { "Connection Failed", JOptionPane.ERROR_MESSAGE); } finally { - if (remote) - serial_line.stop_remote(); + if (remote) { + try { + serial_line.stop_remote(); + } catch (InterruptedException ie) { + } + } serial_line.flush_output(); } monitor.done();