summaryrefslogtreecommitdiff
path: root/telegps/TeleGPS.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-05-28 20:48:59 -0700
committerKeith Packard <keithp@keithp.com>2014-05-28 22:02:31 -0700
commit9a4c2c7fc6af922d052e23a1b99bf847fbf9b0e9 (patch)
tree1ecc22160e68caaa6b46daff8dc026b8f86719d2 /telegps/TeleGPS.java
parent82a69777c67128192b50bbf77ace0a6525f49cac (diff)
telegps: Add scan UI
Move scan UI bits into altosuilib, allow telegps to not show telemetry format options. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'telegps/TeleGPS.java')
-rw-r--r--telegps/TeleGPS.java27
1 files changed, 18 insertions, 9 deletions
diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java
index cceb79b9..34509e4e 100644
--- a/telegps/TeleGPS.java
+++ b/telegps/TeleGPS.java
@@ -158,11 +158,13 @@ public class TeleGPS extends AltosUIFrame implements AltosFlightDisplay, AltosFo
new AltosSiteMapPreload(this);
}
- void monitor() {
- AltosDevice device = AltosDeviceUIDialog.show(this,
- AltosLib.product_basestation);
- if (device == null)
- return;
+ void disconnect() {
+ setTitle("TeleGPS");
+ stop_display();
+ remove_frequency_menu();
+ }
+
+ void connect(AltosDevice device) {
if (reader != null)
disconnect();
try {
@@ -198,13 +200,20 @@ public class TeleGPS extends AltosUIFrame implements AltosFlightDisplay, AltosFo
}
}
- void disconnect() {
- setTitle("TeleGPS");
- stop_display();
- remove_frequency_menu();
+ void monitor() {
+ AltosDevice device = AltosDeviceUIDialog.show(this,
+ AltosLib.product_basestation);
+ if (device == null)
+ return;
+ connect(device);
+ }
+
+ public void scan_device_selected(AltosDevice device) {
+ connect(device);
}
void scan() {
+ new AltosScanUI(this, false);
}
void download(){