diff options
author | Keith Packard <keithp@keithp.com> | 2011-08-28 15:38:12 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-08-28 15:38:12 -0700 |
commit | 27835686648e14b030f6f7ec1fc0c0fd1c387ea4 (patch) | |
tree | a72772197e78b797237c88fe33eb7298d6456eca | |
parent | 6f231a3e512ff7fdd87a399a72c7c36f283394f3 (diff) |
altos: Add RSSI blinking to new-style telemetry code
Pull the RSSI data out locally and set the RSSI led blinking when
using the variable-length TELEM output mechanism.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/core/ao_monitor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/ao_monitor.c b/src/core/ao_monitor.c index 6f2d9dbb..c167b861 100644 --- a/src/core/ao_monitor.c +++ b/src/core/ao_monitor.c @@ -228,6 +228,10 @@ ao_monitor_put(void) printf("%02x", byte); } printf("%02x\n", sum); + if (recv_raw.packet[ao_monitoring + 1] & PKT_APPEND_STATUS_1_CRC_OK) { + rssi = ((int16_t) recv_raw.packet[ao_monitoring] >> 1) - 74; + ao_rssi_set(rssi); + } break; } ao_usb_flush(); |