summaryrefslogtreecommitdiff
path: root/altosui/AltosEepromLog.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-03-25 21:34:31 -0700
committerKeith Packard <keithp@keithp.com>2011-03-25 21:35:44 -0700
commit011615d40b3cb1d1c0ab9fa41e139e263a6a51e7 (patch)
treec9fe599e61a731579c3504ef2eb9fcd41f05ae3d /altosui/AltosEepromLog.java
parentdea80af81b388cc3d7073444919f4e98b12fa730 (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/AltosEepromLog.java')
-rw-r--r--altosui/AltosEepromLog.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/altosui/AltosEepromLog.java b/altosui/AltosEepromLog.java
index 10befad4..4c6deaa0 100644
--- a/altosui/AltosEepromLog.java
+++ b/altosui/AltosEepromLog.java
@@ -73,7 +73,16 @@ public class AltosEepromLog {
in_end_block = in_start_block + 2;
for (block = in_start_block; block < in_end_block; block++) {
- AltosEepromBlock eeblock = new AltosEepromBlock(serial_line, block);
+ AltosEepromChunk eechunk = new AltosEepromChunk(serial_line, block);
+
+ if (block == in_start_block) {
+ if (eechunk.data(0) != Altos.AO_LOG_FLIGHT) {
+ flight = eechunk.data16(0);
+ has_flight = true;
+ break;
+ }
+ }
+ AltosEepromBlock eeblock = new AltosEepromBlock(eechunk);
if (eeblock.has_flight) {
flight = eeblock.flight;
has_flight = true;