AC_WPNav: params always use set method

This commit is contained in:
Iampete1 2022-07-05 04:08:55 +01:00 committed by Peter Hall
parent 22aa09d125
commit ac1b8ab7be
2 changed files with 3 additions and 3 deletions

View File

@ -135,7 +135,7 @@ void AC_Circle::set_center(const Location& center)
void AC_Circle::set_rate(float deg_per_sec)
{
if (!is_equal(deg_per_sec, _rate.get())) {
_rate = deg_per_sec;
_rate.set(deg_per_sec);
}
}

View File

@ -195,8 +195,8 @@ void AC_Loiter::update(bool avoidance_on)
// sanity check parameters
void AC_Loiter::sanity_check_params()
{
_speed_cms = MAX(_speed_cms, LOITER_SPEED_MIN);
_accel_cmss = MIN(_accel_cmss, GRAVITY_MSS * 100.0f * tanf(ToRad(_attitude_control.lean_angle_max_cd() * 0.01f)));
_speed_cms.set(MAX(_speed_cms, LOITER_SPEED_MIN));
_accel_cmss.set(MIN(_accel_cmss, GRAVITY_MSS * 100.0f * tanf(ToRad(_attitude_control.lean_angle_max_cd() * 0.01f))));
}
/// calc_desired_velocity - updates desired velocity (i.e. feed forward) with pilot requested acceleration and fake wind resistance