Skip to content

Commit

Permalink
Plane: consider nan as zero in DO_REPOSITION
Browse files Browse the repository at this point in the history
QGC's interfaces want to send nan for these parameters
  • Loading branch information
peterbarker committed Oct 26, 2023
1 parent 62af92e commit 00a0ec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ArduPlane/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,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;
Expand Down

0 comments on commit 00a0ec7

Please sign in to comment.