From: Keith Packard Date: Mon, 30 Aug 2010 04:40:21 +0000 (-0700) Subject: altosui: discard invalid lines while reading Eeprom flight data X-Git-Tag: debian/0.7+22+g4790f78~20 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=e60c59123232915e808cee23ef89eb1a38ced34b;hp=ae02b1590439d5c8dfb472cf1f83a14fdcfbaf11;ds=sidebyside altosui: discard invalid lines while reading Eeprom flight data This shouldn't happen, but it's easy enough to get back in sync by just skipping lines with weird contents. Signed-off-by: Keith Packard --- diff --git a/ao-tools/altosui/AltosEepromDownload.java b/ao-tools/altosui/AltosEepromDownload.java index 5e43345b..6dbbd3eb 100644 --- a/ao-tools/altosui/AltosEepromDownload.java +++ b/ao-tools/altosui/AltosEepromDownload.java @@ -142,6 +142,7 @@ public class AltosEepromDownload implements Runnable { if (values == null) { System.out.printf("invalid line: %s\n", line); + continue; } else if (values[0] != addr) { System.out.printf("data address out of sync at 0x%x\n", block * 256 + values[0]);