From 992446261808d8531a776feb18902cd6ac9808e5 Mon Sep 17 00:00:00 2001 From: James O'Shannessy <12959316+joshanne@users.noreply.github.com> Date: Mon, 8 Jul 2024 08:01:53 +1000 Subject: [PATCH] AP_Mission: Allow Param4 to be uploaded with NaN By default, QGroundControl will attempt to upload Loiter Unlimited with a NaN in param4. Given this field could be NaN, we allow it through the parser. See: https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_LOITER_UNLIM --- libraries/AP_Mission/AP_Mission.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_Mission/AP_Mission.cpp b/libraries/AP_Mission/AP_Mission.cpp index 8a60c3b68b..ff42107ff6 100644 --- a/libraries/AP_Mission/AP_Mission.cpp +++ b/libraries/AP_Mission/AP_Mission.cpp @@ -964,6 +964,9 @@ MAV_MISSION_RESULT AP_Mission::sanity_check_params(const mavlink_mission_item_in case MAV_CMD_NAV_WAYPOINT: nan_mask = ~(1 << 3); // param 4 can be nan break; + case MAV_CMD_NAV_LOITER_UNLIM: + nan_mask = ~(1 << 3); // param 4 can be nan + break; case MAV_CMD_NAV_LAND: nan_mask = ~(1 << 3); // param 4 can be nan break;