diff options
| author | Keith Packard <keithp@keithp.com> | 2015-02-07 17:09:40 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2015-02-07 17:09:40 -0800 | 
| commit | cbc9ecd960d0dd27a2275b4550c30c5c88ccf5bb (patch) | |
| tree | 61638d8211f20361c1ff4a183b3cca97c694ca2e /altosuilib/AltosScanUI.java | |
| parent | c0ce45100dd205f59cd84465138c74d9b31df0bb (diff) | |
altosuilib: Reset telemetry state after processing it
This avoids re-using stale state after switching telemetry reception
parameters around, which otherwise generates spurious entries for the
wrong frequencies in the scan results list.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib/AltosScanUI.java')
| -rw-r--r-- | altosuilib/AltosScanUI.java | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/altosuilib/AltosScanUI.java b/altosuilib/AltosScanUI.java index 1b30f99d..a20a7e14 100644 --- a/altosuilib/AltosScanUI.java +++ b/altosuilib/AltosScanUI.java @@ -210,6 +210,8 @@ public class AltosScanUI  													     frequencies[frequency_index],  													     telemetry,  													     rate); +							/* Reset the state so we don't get this data for another channel */ +							state.init();  							Runnable r = new Runnable() {  									public void run() {  										results.add(result); @@ -254,9 +256,6 @@ public class AltosScanUI  	void next() throws InterruptedException, TimeoutException {  		reader.set_monitor(false); -		/* Let any pending input from the last configuration drain out */ -		Thread.sleep(100); -  		if (select_rate) {  			boolean	wrapped = false;  			do { | 
