X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=telegps%2FTeleGPS.java;h=34509e4ec92ca95817bc9dc77c5ea3dce0b91ded;hp=cceb79b9b6633546f4cc2ba3941053cd499fc8ee;hb=9a4c2c7fc6af922d052e23a1b99bf847fbf9b0e9;hpb=82a69777c67128192b50bbf77ace0a6525f49cac;ds=sidebyside 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(){