X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosIdleMonitorUI.java;h=0230ff2f767959a2c73301e4c5d2ae21748a26e4;hb=master;hp=fc76b2b658c87db172a8043bce7e6912679ae7fa;hpb=297eb795b24ec31f6599f48bc8c3769557a7ec6f;p=fw%2Faltos diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index fc76b2b6..ba894c71 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -25,8 +25,8 @@ import javax.swing.event.*; import java.io.*; import java.util.concurrent.*; import java.util.Arrays; -import org.altusmetrum.altoslib_13.*; -import org.altusmetrum.altosuilib_13.*; +import org.altusmetrum.altoslib_14.*; +import org.altusmetrum.altosuilib_14.*; public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDisplay, AltosIdleMonitorListener, DocumentListener { AltosDevice device; @@ -209,7 +209,7 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl device = AltosDeviceUIDialog.show(in_owner, Altos.product_any); remote = false; - if (!device.matchProduct(Altos.product_altimeter)) + if (device.matchProduct(Altos.product_basestation)) remote = true; serial = device.getSerial(); @@ -226,7 +226,7 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl /* We let the user set the freq/callsign, so don't bother with the cancel dialog */ link.set_cancel_enable(false); - bag = getContentPane(); + bag = getScrollablePane(); bag.setLayout(new GridBagLayout()); setTitle(String.format("AltOS %s", device.toShortString())); @@ -297,6 +297,8 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl thread = new AltosIdleMonitor(this, link, (boolean) remote); + thread.set_frequency(AltosUIPreferences.frequency(serial)); + status_update = new AltosFlightStatusUpdate(flightStatus); new javax.swing.Timer(100, status_update).start();