From 3570ce375559a61cb30762962961e33d2887a816 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 27 Sep 2024 11:01:25 +1000 Subject: [PATCH] ArduSub: split sending terrain report from terrain request --- ArduSub/GCS_Mavlink.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ArduSub/GCS_Mavlink.cpp b/ArduSub/GCS_Mavlink.cpp index fc2b5c0227945d..74c59b30820e73 100644 --- a/ArduSub/GCS_Mavlink.cpp +++ b/ArduSub/GCS_Mavlink.cpp @@ -248,12 +248,16 @@ bool GCS_MAVLINK_Sub::try_send_message(enum ap_message id) send_info(); break; - case MSG_TERRAIN: #if AP_TERRAIN_AVAILABLE + case MSG_TERRAIN: CHECK_PAYLOAD_SIZE(TERRAIN_REQUEST); sub.terrain.send_request(chan); -#endif break; + case MSG_TERRAIN_REPORT: + CHECK_PAYLOAD_SIZE(TERRAIN_REPORT); + sub.terrain.send_report(chan); + break; +#endif default: return GCS_MAVLINK::try_send_message(id);