From 27835686648e14b030f6f7ec1fc0c0fd1c387ea4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 28 Aug 2011 15:38:12 -0700 Subject: [PATCH] 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 --- src/core/ao_monitor.c | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- 2.30.2