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;