- AltosLine l = telem.take();
- if (l.line == null)
- throw new IOException("IO error");
- AltosRecord next = AltosTelemetry.parse(l.line, previous);
- previous = next;
- state = new AltosState (next, state);
+ AltosLine l;
+ do {
+ l = telem.take();
+ if (l.line == null)
+ throw new IOException("IO error");
+ } while (!link.get_monitor());
+ AltosTelemetry telem = AltosTelemetry.parse(l.line);
+ if (cal_data == null)
+ cal_data = new AltosCalData();
+ if (state == null)
+ state = new AltosState(cal_data);
+ telem.provide_data(state, cal_data);