From d41edb3384b6336f3482e61b0c9f9400a8b4f519 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 19 Apr 2011 15:29:39 -0700 Subject: altosui: Make flight data download work through TeleBT This required flushing input before reading data blocks and adjusting some delays. Signed-off-by: Keith Packard --- altosui/AltosEepromLog.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'altosui/AltosEepromLog.java') diff --git a/altosui/AltosEepromLog.java b/altosui/AltosEepromLog.java index f7fb39e1..0cf420d9 100644 --- a/altosui/AltosEepromLog.java +++ b/altosui/AltosEepromLog.java @@ -47,7 +47,8 @@ public class AltosEepromLog { boolean delete; public AltosEepromLog(AltosSerial serial_line, int in_serial, - int in_start_block, int in_end_block) + int in_flight, int in_start_block, + int in_end_block) throws InterruptedException, TimeoutException { int block; @@ -73,8 +74,8 @@ public class AltosEepromLog { AltosEepromChunk eechunk = new AltosEepromChunk(serial_line, block); if (block == in_start_block) { - if (eechunk.data(0) != Altos.AO_LOG_FLIGHT) { - flight = eechunk.data16(0); + if (eechunk.data16(0) == in_flight) { + flight = in_flight; has_flight = true; break; } -- cgit v1.2.3