summaryrefslogtreecommitdiff
path: root/altosui/AltosEepromLog.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-04-19 15:29:39 -0700
committerKeith Packard <keithp@keithp.com>2011-04-19 15:29:39 -0700
commitd41edb3384b6336f3482e61b0c9f9400a8b4f519 (patch)
tree9741801892421f6bff7106cb0c949af4b72555dd /altosui/AltosEepromLog.java
parent44fb71ca3e5bccd5f601fc5a2d5da7292050b1d6 (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosEepromLog.java')
-rw-r--r--altosui/AltosEepromLog.java7
1 files changed, 4 insertions, 3 deletions
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;
}