mirror of https://github.com/ArduPilot/ardupilot
AC_WPNav: bug fix sanity check of set_speed_xy
This corrects a bug that allowed the waypoint speed to be set to zero
This commit is contained in:
parent
65472eaf62
commit
ba5e368175
|
@ -341,7 +341,7 @@ void AC_WPNav::wp_and_spline_init()
|
||||||
void AC_WPNav::set_speed_xy(float speed_cms)
|
void AC_WPNav::set_speed_xy(float speed_cms)
|
||||||
{
|
{
|
||||||
// range check new target speed and update position controller
|
// range check new target speed and update position controller
|
||||||
if (_wp_speed_cms >= WPNAV_WP_SPEED_MIN) {
|
if (speed_cms >= WPNAV_WP_SPEED_MIN) {
|
||||||
_wp_speed_cms = speed_cms;
|
_wp_speed_cms = speed_cms;
|
||||||
_pos_control.set_speed_xy(_wp_speed_cms);
|
_pos_control.set_speed_xy(_wp_speed_cms);
|
||||||
// flag that wp leash must be recalculated
|
// flag that wp leash must be recalculated
|
||||||
|
|
Loading…
Reference in New Issue