From: Keith Packard Date: Sun, 28 Aug 2011 22:38:12 +0000 (-0700) Subject: altos: Add RSSI blinking to new-style telemetry code X-Git-Tag: 1.0.9.1~25 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=27835686648e14b030f6f7ec1fc0c0fd1c387ea4;hp=6f231a3e512ff7fdd87a399a72c7c36f283394f3 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 --- 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();