summaryrefslogtreecommitdiff
path: root/altosui/AltosEepromBlock.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-02-19 01:06:01 -0800
committerKeith Packard <keithp@keithp.com>2011-02-19 01:11:53 -0800
commit249cd3b63d97581b068fff988e0cd7fcd5bf493e (patch)
tree5cbc854d4fa8732fc4de28d4e902ad1fc844ee77 /altosui/AltosEepromBlock.java
parent629a7637871b24fe6d1204aaa7185d84933d4639 (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosEepromBlock.java')
-rw-r--r--altosui/AltosEepromBlock.java3
1 files changed, 3 insertions, 0 deletions
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<AltosEepromRecord> {
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<AltosEepromRecord> {
} 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);
}