telegps: Hook up data download dialog
[fw/altos] / telegps / TeleGPS.java
index cceb79b9b6633546f4cc2ba3941053cd499fc8ee..ad46fbdd865b755ccb26c96339531c62b5e3bfee 100644 (file)
@@ -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,16 +200,24 @@ 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(){
+               new AltosEepromManage(this, AltosLib.product_telegps);
        }
 
        void configure() {