diff options
| author | Keith Packard <keithp@keithp.com> | 2014-05-28 20:48:59 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2014-05-28 22:02:31 -0700 | 
| commit | 9a4c2c7fc6af922d052e23a1b99bf847fbf9b0e9 (patch) | |
| tree | 1ecc22160e68caaa6b46daff8dc026b8f86719d2 /telegps/TeleGPS.java | |
| parent | 82a69777c67128192b50bbf77ace0a6525f49cac (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.java | 27 | 
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(){ | 
