From 4384f53dced81ed39e4984272bf2d8d8b25da2ee Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 2 Sep 2023 15:21:35 +1000 Subject: [PATCH] AP_RSSI: allow more libraries to compile with no HAL_GCS_ENABLED --- libraries/AP_RSSI/AP_RSSI.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_RSSI/AP_RSSI.cpp b/libraries/AP_RSSI/AP_RSSI.cpp index 594317fe8b..883ae2662e 100644 --- a/libraries/AP_RSSI/AP_RSSI.cpp +++ b/libraries/AP_RSSI/AP_RSSI.cpp @@ -225,7 +225,11 @@ float AP_RSSI::read_pwm_pin_rssi() float AP_RSSI::read_telemetry_radio_rssi() { +#if HAL_GCS_ENABLED return GCS_MAVLINK::telemetry_radio_rssi(); +#else + return 0; +#endif } // Scale and constrain a float rssi value to 0.0 to 1.0 range