ArduCopter: 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 3e1ad5dab6
commit 8e9de04221
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,9 @@
void Copter::init_precland()
{
copter.precland.init(400);
// scheduler table specifies 400Hz, but we can call it no faster
// than the scheduler loop rate:
copter.precland.init(MIN(400, scheduler.get_loop_rate_hz()));
}
void Copter::update_precland()