ArduPlane: correct initialisation of PrecLand buffers

this value determines the size of buffers allocated.

Too high and you waste RAM.  Too low and you probably won't store data correctly.
This commit is contained in:
Peter Barker 2024-09-22 13:46:09 +10:00 committed by Randy Mackay
parent 8e9de04221
commit dc0941ac09
1 changed files with 3 additions and 1 deletions

View File

@ -162,7 +162,9 @@ void Plane::init_ardupilot()
#endif
#if AC_PRECLAND_ENABLED
g2.precland.init(scheduler.get_loop_rate_hz());
// scheduler table specifies 400Hz, but we can call it no faster
// than the scheduler loop rate:
g2.precland.init(MIN(400, scheduler.get_loop_rate_hz()));
#endif
#if AP_ICENGINE_ENABLED