1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Use peak tracking as default for task duration estimation rather than a moving average

This commit is contained in:
Steve Evans 2020-08-14 16:42:20 +01:00 committed by Steve Evans
parent bfd597a449
commit 29d221502e
23 changed files with 100 additions and 91 deletions

View file

@ -1066,8 +1066,8 @@ static void applyStatusProfile(timeUs_t now) {
}
if (!timActive) {
// Call ignoreTaskExecTime() unless data is being processed
ignoreTaskExecTime();
// Call schedulerIgnoreTaskExecTime() unless data is being processed
schedulerIgnoreTaskExecTime();
return; // no change this update, keep old state
}
@ -1248,13 +1248,11 @@ static void applySimpleProfile(timeUs_t currentTimeUs)
void ledStripUpdate(timeUs_t currentTimeUs)
{
#ifndef USE_LED_STRIP_STATUS_MODE
UNUSED(currentTimeUs);
#endif
if (!isWS2811LedStripReady()) {
// Call ignoreTaskExecTime() unless data is being processed
ignoreTaskExecTime();
// Call schedulerIgnoreTaskExecTime() unless data is being processed
schedulerIgnoreTaskExecTime();
return;
}
@ -1282,8 +1280,8 @@ void ledStripUpdate(timeUs_t currentTimeUs)
break;
}
} else {
// Call ignoreTaskExecTime() unless data is being processed
ignoreTaskExecTime();
// Call schedulerIgnoreTaskExecTime() unless data is being processed
schedulerIgnoreTaskExecTime();
}
}