diff --git a/APMrover2/GCS_Mavlink.cpp b/APMrover2/GCS_Mavlink.cpp index fe765d29b6..108c01f06f 100644 --- a/APMrover2/GCS_Mavlink.cpp +++ b/APMrover2/GCS_Mavlink.cpp @@ -144,7 +144,7 @@ void Rover::send_nav_controller_output(mavlink_channel_t chan) ahrs.groundspeed() * ins.get_gyro().z, // use nav_pitch to hold actual Y accel nav_controller->nav_bearing_cd() * 0.01f, nav_controller->target_bearing_cd() * 0.01f, - wp_distance, + MIN(wp_distance, UINT16_MAX), 0, groundspeed_error, nav_controller->crosstrack_error());