- voice.speak("Rocket flight monitor ready.");
- }
-
- class DeviceThread extends AltosDisplayThread {
- AltosSerial serial;
- LinkedBlockingQueue<AltosLine> telem;
-
- AltosRecord read() throws InterruptedException, ParseException, AltosCRCException, IOException {
- AltosLine l = telem.take();
- if (l.line == null)
- throw new IOException("IO error");
- return new AltosTelemetry(l.line);
- }
-
- void close(boolean interrupted) {
- serial.close();
- serial.remove_monitor(telem);
- }
-
- public DeviceThread(AltosSerial s, String in_name, AltosVoice voice, AltosStatusTable status, AltosInfoTable info) {
- super(AltosUI.this, voice, status, info);
- serial = s;
- telem = new LinkedBlockingQueue<AltosLine>();
- serial.add_monitor(telem);
- name = in_name;
- }