diff options
author | Keith Packard <keithp@keithp.com> | 2011-03-25 21:34:31 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-03-25 21:35:44 -0700 |
commit | 011615d40b3cb1d1c0ab9fa41e139e263a6a51e7 (patch) | |
tree | c9fe599e61a731579c3504ef2eb9fcd41f05ae3d /altosui/AltosEepromBlock.java | |
parent | dea80af81b388cc3d7073444919f4e98b12fa730 (diff) |
altosui: Add support for downloading TeleMini/TeleNano flight logs
Splits the eeprom downloading code into eeprom block downloading and
separate eeprom data parsing so that the new data logging format can
share the data downloading code.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosEepromBlock.java')
-rw-r--r-- | altosui/AltosEepromBlock.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/altosui/AltosEepromBlock.java b/altosui/AltosEepromBlock.java index d59fd39e..650920d1 100644 --- a/altosui/AltosEepromBlock.java +++ b/altosui/AltosEepromBlock.java @@ -46,7 +46,7 @@ public class AltosEepromBlock extends ArrayList<AltosEepromRecord> { int hour, minute, second; ParseException parse_exception = null; - public AltosEepromBlock (AltosSerial serial_line, int block) throws TimeoutException, InterruptedException { + public AltosEepromBlock (AltosEepromChunk chunk) { int addr; boolean done = false; @@ -56,10 +56,9 @@ public class AltosEepromBlock extends ArrayList<AltosEepromRecord> { has_lat = false; has_lon = false; has_time = false; - serial_line.printf("e %x\n", block); - for (addr = 0; addr < 0x100;) { + for (addr = 0; addr < chunk.chunk_size;) { try { - AltosEepromRecord r = new AltosEepromRecord(serial_line, block * 256 + addr); + AltosEepromRecord r = new AltosEepromRecord(chunk, addr); if (r.cmd == Altos.AO_LOG_FLIGHT) { flight = r.b; |