summaryrefslogtreecommitdiff
path: root/altoslib/AltosIdleMonitor.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-04-09 00:28:05 -0700
committerKeith Packard <keithp@keithp.com>2013-04-09 00:30:36 -0700
commit398c02b945a58634c8932f07df2c2be8438da7d1 (patch)
tree2741e99555d58e9509271da719d039516e16819f /altoslib/AltosIdleMonitor.java
parent08eb1e3e1abb1aa4f5ea92b781a2ff8f480006c5 (diff)
altoslib/altosui: Carry receiver status around in AltosListenerState
This moves the crc_errors into the new structure and adds a receiver battery voltage value there as well. Now the receiver status can be monitored separately from the flight status. That also means that code receiving state updates should be prepared to accept missing listener or flight state values. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosIdleMonitor.java')
-rw-r--r--altoslib/AltosIdleMonitor.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/altoslib/AltosIdleMonitor.java b/altoslib/AltosIdleMonitor.java
index f2f75bbb..ec51b9c1 100644
--- a/altoslib/AltosIdleMonitor.java
+++ b/altoslib/AltosIdleMonitor.java
@@ -116,8 +116,10 @@ public class AltosIdleMonitor extends Thread {
} finally {
if (remote) {
link.stop_remote();
- if (record != null)
- record.rssi = AltosRSSI();
+ if (record != null) {
+ record.rssi = link.rssi();
+ record.monitor_battery = link.monitor_battery();
+ }
} else {
if (record != null)
record.rssi = 0;