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 54be4f5..bc1638e 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();