mirror of https://github.com/ArduPilot/ardupilot
AC_WPNav: params always use set method
This commit is contained in:
parent
22aa09d125
commit
ac1b8ab7be
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue