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