From 7961eb60451319100efb45f25ce19922cafd930c Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 26 Oct 2023 12:47:12 +1100 Subject: [PATCH] Plane: consider nan as zero in DO_REPOSITION QGC's interfaces want to send nan for these parameters --- ArduPlane/GCS_Mavlink.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduPlane/GCS_Mavlink.cpp b/ArduPlane/GCS_Mavlink.cpp index 2cc891dafe..6fe2cc70a9 100644 --- a/ArduPlane/GCS_Mavlink.cpp +++ b/ArduPlane/GCS_Mavlink.cpp @@ -804,7 +804,7 @@ MAV_RESULT GCS_MAVLINK_Plane::handle_command_int_do_reposition(const mavlink_com return MAV_RESULT_DENIED; } - if (is_zero(packet.param4)) { + if (isnan(packet.param4) || is_zero(packet.param4)) { requested_position.loiter_ccw = 0; } else { requested_position.loiter_ccw = 1;