From 9a7b4f02ad32ca43a45ed9fe446b8db96e60b5e5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 11 Nov 2017 20:49:20 -0800 Subject: altoslib: Improve EEprom download * Catch and report CRC errors * Deal with corrupted flight records * Add ability to immediately graph new data * Check before overwriting existing files Signed-off-by: Keith Packard --- altoslib/AltosEepromList.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'altoslib/AltosEepromList.java') diff --git a/altoslib/AltosEepromList.java b/altoslib/AltosEepromList.java index 55d47e20..c55bcaaa 100644 --- a/altoslib/AltosEepromList.java +++ b/altoslib/AltosEepromList.java @@ -87,7 +87,7 @@ public class AltosEepromList extends ArrayList { start = AltosParse.parse_hex(tokens[3]); if (tokens[4].equals("end")) end = AltosParse.parse_hex(tokens[5]); - if (flight > 0 && start >= 0 && end > 0) + if (flight != 0 && start >= 0 && end > 0) flights.add(new AltosEepromFlight(flight, start, end)); } catch (ParseException pe) { System.out.printf("Parse error %s\n", pe.toString()); } } @@ -115,4 +115,4 @@ public class AltosEepromList extends ArrayList { link.flush_output(); } } -} \ No newline at end of file +} -- cgit v1.2.3