Plane: Handle NAV_CONTROLLER_OUTPUT.wp_dist overflowing

This commit is contained in:
Michael du Breuil 2017-06-18 22:39:07 -07:00 committed by Francisco Ferreira
parent bc8c13d053
commit 8691eae679

View File

@ -199,7 +199,7 @@ void Plane::send_nav_controller_output(mavlink_channel_t chan)
nav_pitch_cd * 0.01f,
nav_controller->nav_bearing_cd() * 0.01f,
nav_controller->target_bearing_cd() * 0.01f,
auto_state.wp_distance,
MIN(auto_state.wp_distance, UINT16_MAX),
altitude_error_cm * 0.01f,
airspeed_error * 100,
nav_controller->crosstrack_error());