Browse Source

AC_PrecLand: params always use set method

apm_2208
Iampete1 3 years ago committed by Peter Hall
parent
commit
22aa09d125
  1. 2
      libraries/AC_PrecLand/AC_PrecLand.cpp

2
libraries/AC_PrecLand/AC_PrecLand.cpp

@ -203,7 +203,7 @@ void AC_PrecLand::init(uint16_t update_rate_hz) @@ -203,7 +203,7 @@ void AC_PrecLand::init(uint16_t update_rate_hz)
// create inertial history buffer
// constrain lag parameter to be within bounds
_lag = constrain_float(_lag, 0.02f, 0.25f);
_lag.set(constrain_float(_lag, 0.02f, 0.25f));
// calculate inertial buffer size from lag and minimum of main loop rate and update_rate_hz argument
const uint16_t inertial_buffer_size = MAX((uint16_t)roundf(_lag * MIN(update_rate_hz, AP::scheduler().get_loop_rate_hz())), 1);

Loading…
Cancel
Save