1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

startup grace time for filter initialisation

This commit is contained in:
Corvus Corax 2013-06-09 21:49:04 +02:00
parent 218e15ce61
commit d8f9f839f2

View File

@ -311,6 +311,14 @@ static void StateEstimationCb(void)
static filterPipeline *current;
static stateEstimation states;
static uint32_t last_time;
static uint16_t bootDelay = 64;
// after system startup, first few sensor readings might be messed up, delay until everything has settled
if (bootDelay) {
bootDelay--;
DelayedCallbackSchedule(stateEstimationCallback, TIMEOUT_MS, CALLBACK_UPDATEMODE_SOONER);
return;
}
switch (runState) {
case RUNSTATE_LOAD: