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