altosui: Initialize channel and telemetry before use in ScanUI
authorKeith Packard <keithp@keithp.com>
Sun, 17 Jul 2011 03:43:57 +0000 (20:43 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 17 Jul 2011 03:46:04 +0000 (20:46 -0700)
Otherwise we try to use telemetry format 0, which means 'no telemetry'.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosScanUI.java

index 54be4f5275037f43266c51e22fe4433b69c807b7..bc1638ed0ebd4781c73c0077cfe811d0e27b2efc 100644 (file)
@@ -311,6 +311,9 @@ public class AltosScanUI
 
                owner = in_owner;
 
+               channel = 0;
+               telemetry = Altos.ao_telemetry_min;
+
                if (!open())
                        return;
 
@@ -326,9 +329,6 @@ public class AltosScanUI
 
                pane.setLayout(new GridBagLayout());
 
-               channel = 0;
-               telemetry = Altos.ao_telemetry_min;
-
                scanning_label = new JLabel("Scanning:");
                
                set_label();