From 2c1970e766f6ae5d5a6ac99f52f1ab23e041bec5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 19 Feb 2011 01:06:01 -0800 Subject: altosui: Display eeprom parsing errors to user When reading the eeprom, any parsing errors (most likely bad checksums) indicate some kind of problem with either the hardware or the flight software. Display these to the user and do not erase the flight. Signed-off-by: Keith Packard (cherry picked from commit 249cd3b63d97581b068fff988e0cd7fcd5bf493e) --- altosui/AltosEepromBlock.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'altosui/AltosEepromBlock.java') diff --git a/altosui/AltosEepromBlock.java b/altosui/AltosEepromBlock.java index 11438df8..d59fd39e 100644 --- a/altosui/AltosEepromBlock.java +++ b/altosui/AltosEepromBlock.java @@ -44,6 +44,7 @@ public class AltosEepromBlock extends ArrayList { double lon; boolean has_time; int hour, minute, second; + ParseException parse_exception = null; public AltosEepromBlock (AltosSerial serial_line, int block) throws TimeoutException, InterruptedException { int addr; @@ -100,6 +101,8 @@ public class AltosEepromBlock extends ArrayList { } catch (ParseException pe) { AltosEepromRecord r = new AltosEepromRecord(Altos.AO_LOG_INVALID, 0, 0, 0); + if (parse_exception == null) + parse_exception = pe; if (!done) add(addr/8, r); } -- cgit v1.2.3