altoslib: Remove telem monitoring when closing log file
authorKeith Packard <keithp@keithp.com>
Fri, 13 Jun 2014 07:27:19 +0000 (00:27 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 13 Jun 2014 07:27:19 +0000 (00:27 -0700)
If we don't remove the telemetry monitor, the telemetry device will
still be sending telemetry, which isn't good.

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

index 8ecb1e96707a4192af1e95b87bddf13ac62cc343..c4e9e4257a1f318dbf7a90bfe00fd85bf2d1918e 100644 (file)
@@ -48,6 +48,7 @@ public class AltosLog implements Runnable {
        }
 
        public void close() {
        }
 
        public void close() {
+               link.remove_monitor(input_queue);
                close_log_file();
                if (log_thread != null) {
                        log_thread.interrupt();
                close_log_file();
                if (log_thread != null) {
                        log_thread.interrupt();