From d086ba03c8cd4dc29c6a78607a436a83c06fa025 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Thu, 29 Feb 2024 15:57:37 +0000 Subject: [PATCH] ArduCopter: don't try and send MSG_RANGEFINDER if AP_RANGEFINDER_ENABLED is false --- ArduCopter/GCS_Mavlink.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArduCopter/GCS_Mavlink.cpp b/ArduCopter/GCS_Mavlink.cpp index f625654ce2..8b2afe8d41 100644 --- a/ArduCopter/GCS_Mavlink.cpp +++ b/ArduCopter/GCS_Mavlink.cpp @@ -544,7 +544,9 @@ static const ap_message STREAM_EXTRA3_msgs[] = { MSG_AHRS, MSG_SYSTEM_TIME, MSG_WIND, +#if AP_RANGEFINDER_ENABLED MSG_RANGEFINDER, +#endif MSG_DISTANCE_SENSOR, #if AP_TERRAIN_AVAILABLE MSG_TERRAIN,