diff options
| author | Anthony Towns <aj@erisian.com.au> | 2010-09-05 20:49:34 +1000 |
|---|---|---|
| committer | Anthony Towns <aj@erisian.com.au> | 2010-09-05 20:49:34 +1000 |
| commit | ddc83b4c401be965a9947782becf20cc8c54e6a2 (patch) | |
| tree | 3fa313271f3c3e42ca9cc76f8cca1937067ee907 /ao-tools/altosui/AltosTelemetryReader.java | |
| parent | afea6c264c5ebf12f1d629bd4bc724da86d11b7a (diff) | |
| parent | 3d49d5f69b41c27003dbc5ccf1899014bd13bd99 (diff) | |
Merge branch 'master' of git://git.gag.com/fw/altos
Diffstat (limited to 'ao-tools/altosui/AltosTelemetryReader.java')
| -rw-r--r-- | ao-tools/altosui/AltosTelemetryReader.java | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/ao-tools/altosui/AltosTelemetryReader.java b/ao-tools/altosui/AltosTelemetryReader.java index f1f6788c..fdedbde2 100644 --- a/ao-tools/altosui/AltosTelemetryReader.java +++ b/ao-tools/altosui/AltosTelemetryReader.java @@ -47,20 +47,27 @@ public class AltosTelemetryReader extends AltosReader { try { for (;;) { String line = AltosRecord.gets(input); - if (line == null) + if (line == null) { break; - AltosTelemetry record = new AltosTelemetry(line); - if (record == null) - break; - if (!saw_boost && record.state >= Altos.ao_flight_boost) - { - saw_boost = true; - boost_tick = record.tick; } - records.add(record); + try { + AltosTelemetry record = new AltosTelemetry(line); + if (record == null) + break; + if (!saw_boost && record.state >= Altos.ao_flight_boost) + { + saw_boost = true; + boost_tick = record.tick; + } + records.add(record); + } catch (ParseException pe) { + System.out.printf("parse exception %s\n", pe.getMessage()); + } catch (AltosCRCException ce) { + System.out.printf("crc error\n"); + } } } catch (IOException io) { - } catch (ParseException pe) { + System.out.printf("io exception\n"); } record_iterator = records.iterator(); try { |
