AP_LTM_Telem: correct compilation with AP_RRSI_ENABLED false

Co-authored-by: David Buzz <davidbuzz@gmail.com>
This commit is contained in:
Peter Barker 2024-07-23 20:51:07 +10:00 committed by Peter Barker
parent a371a3eb89
commit 1afa801b19
1 changed files with 2 additions and 0 deletions

View File

@ -142,10 +142,12 @@ void AP_LTM_Telem::send_Sframe(void)
const uint8_t flightmode = AP_Notify::flags.flight_mode; // flight mode const uint8_t flightmode = AP_Notify::flags.flight_mode; // flight mode
uint8_t rssi = 0; // radio RSSI (%a) uint8_t rssi = 0; // radio RSSI (%a)
#if AP_RSSI_ENABLED
AP_RSSI *ap_rssi = AP_RSSI::get_singleton(); AP_RSSI *ap_rssi = AP_RSSI::get_singleton();
if (ap_rssi) { if (ap_rssi) {
rssi = ap_rssi->read_receiver_rssi_uint8(); rssi = ap_rssi->read_receiver_rssi_uint8();
} }
#endif
const uint8_t armstat = AP_Notify::flags.armed; // 0: disarmed, 1: armed 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 const uint8_t failsafe = AP_Notify::flags.failsafe_radio; // 0: normal, 1: failsafe