- AltosLine l = telem.take();
- if (l.line == null)
- throw new IOException("IO error");
- AltosTelemetry telem = AltosTelemetryLegacy.parse(l.line);
- if (state == null)
- state = new AltosState();
- else
- state = state.clone();
- telem.update_state(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 (state == null) {
+ System.out.printf("Make state\n");
+ state = new AltosState(cal_data());
+ }
+ telem.provide_data(state);