From 427743babf067b72a749872783a5629afbd19cd9 Mon Sep 17 00:00:00 2001 From: Bob Long Date: Fri, 7 Feb 2025 10:01:05 +1100 Subject: [PATCH] GCS_Common: better handle negative intervals Treat all negative interval values like -1. --- libraries/GCS_MAVLink/GCS_Common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 41edb3152ae369..ef3f8d471e5df3 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -3127,7 +3127,7 @@ MAV_RESULT GCS_MAVLINK::set_message_interval(uint32_t msg_id, int32_t interval_u // at. interval_ms = 0; } - } else if (interval_us == -1) { + } else if (interval_us < 0) { // minus-one is "stop sending" interval_ms = 0; } else if (interval_us < 1000) {