docs: Document altosui "Graph Data" button
[fw/altos] / ao-tools / altosui / AltosTelemetryReader.java
index 03e694f8bc7dfef11338d43fba62d8e6dd0eacb9..6c5a93978c69a4156e0e44fe3b94b3ea7a9c92c0 100644 (file)
@@ -44,20 +44,18 @@ class AltosTelemetryReader extends AltosFlightReader {
 
        void set_channel(int channel) {
                serial.set_channel(channel);
+               AltosPreferences.set_channel(device.getSerial(), channel);
        }
 
-       void set_callsign(String callsign) {
-               serial.set_callsign(callsign);
-       }
-
-       public AltosTelemetryReader (AltosDevice in_device) throws FileNotFoundException, IOException {
+       public AltosTelemetryReader (AltosDevice in_device)
+               throws FileNotFoundException, AltosSerialInUseException, IOException {
                device = in_device;
-               serial = new AltosSerial();
+               serial = new AltosSerial(device);
                log = new AltosLog(serial);
-               name = device.getPath();
+               name = device.toShortString();
 
                telem = new LinkedBlockingQueue<AltosLine>();
+               serial.set_radio();
                serial.add_monitor(telem);
-        serial.open(device);
        }
 }