From 1afa801b196c21a36761d18e8a7274a3653af4d6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 23 Jul 2024 20:51:07 +1000 Subject: [PATCH] AP_LTM_Telem: correct compilation with AP_RRSI_ENABLED false Co-authored-by: David Buzz --- libraries/AP_LTM_Telem/AP_LTM_Telem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_LTM_Telem/AP_LTM_Telem.cpp b/libraries/AP_LTM_Telem/AP_LTM_Telem.cpp index 5d3bdc2f41..ebc44a3937 100644 --- a/libraries/AP_LTM_Telem/AP_LTM_Telem.cpp +++ b/libraries/AP_LTM_Telem/AP_LTM_Telem.cpp @@ -142,10 +142,12 @@ void AP_LTM_Telem::send_Sframe(void) const uint8_t flightmode = AP_Notify::flags.flight_mode; // flight mode uint8_t rssi = 0; // radio RSSI (%a) +#if AP_RSSI_ENABLED AP_RSSI *ap_rssi = AP_RSSI::get_singleton(); if (ap_rssi) { rssi = ap_rssi->read_receiver_rssi_uint8(); } +#endif const uint8_t armstat = AP_Notify::flags.armed; // 0: disarmed, 1: armed const uint8_t failsafe = AP_Notify::flags.failsafe_radio; // 0: normal, 1: failsafe