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-03-19 16:50:44 -0700
commit2c1970e766f6ae5d5a6ac99f52f1ab23e041bec5 (patch)
tree06dd5a70f81069f84905ba26f14785bb93e78830 /altosui/AltosEepromBlock.java
parent762657983fcf526cdf99b59a541e3f3cbb0701dc (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> (cherry picked from commit 249cd3b63d97581b068fff988e0cd7fcd5bf493e)
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);
}