altoslib: Disable telemetry while getting config data
authorKeith Packard <keithp@keithp.com>
Wed, 25 Jun 2014 20:50:54 +0000 (13:50 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 5 Jul 2014 07:38:09 +0000 (00:38 -0700)
We're seeing some log files created without a suitable -via- number
included. My hypothesis is that incoming telemetry is getting
interleaved with the configuration data containing the serial
number. This change simply disables telemetry while retrieving the
configuration data to try and keep that from happening.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosLink.java

index 08bca5fc9e864291b31557f26608e30ea7a29af3..ef40c8cb4cbcaebd5d6e98e21810bc65394e9cd5 100644 (file)
@@ -385,8 +385,12 @@ public abstract class AltosLink implements Runnable {
 
        public AltosConfigData config_data() throws InterruptedException, TimeoutException {
                synchronized(config_data_lock) {
-                       if (config_data == null)
+                       if (config_data == null) {
+                               printf("m 0\n");
                                config_data = new AltosConfigData(this);
+                               if (monitor_mode)
+                                       set_monitor(true);
+                       }
                        return config_data;
                }
        }