Plane: consider nan as zero in DO_REPOSITION

QGC's interfaces want to send nan for these parameters
This commit is contained in:
Peter Barker 2023-10-26 12:47:12 +11:00 committed by Peter Barker
parent e5613de586
commit 7961eb6045
1 changed files with 1 additions and 1 deletions

View File

@ -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;