mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Use cpu_late_10ths_percent_limit to set limit on % of late tasks in 10th of a % (#13330)
* Use cpu_late_10ths_percent_limit to set limit on % of late tasks in 10th of a % Set CPU load late limit to 1% based on testing * Update src/main/cli/settings.c Co-authored-by: Jan Post <Rm2k-Freak@web.de> * Update src/main/scheduler/scheduler.h Co-authored-by: Jan Post <Rm2k-Freak@web.de> * Update src/main/fc/core.c * Update src/test/unit/arming_prevention_unittest.cc * Update src/main/scheduler/scheduler.c --------- Co-authored-by: Mark Haslinghuis <mark@numloq.nl> Co-authored-by: Jan Post <Rm2k-Freak@web.de>
This commit is contained in:
parent
a190ed98dc
commit
e3e67b2ecb
9 changed files with 38 additions and 2 deletions
|
@ -323,11 +323,13 @@ void updateArmingStatus(void)
|
|||
unsetArmingDisabled(ARMING_DISABLED_ANGLE);
|
||||
}
|
||||
|
||||
if (getAverageSystemLoadPercent() > LOAD_PERCENTAGE_ONE) {
|
||||
#if defined(USE_LATE_TASK_STATISTICS)
|
||||
if ((getCpuPercentageLate() > schedulerConfig()->cpuLatePercentageLimit)) {
|
||||
setArmingDisabled(ARMING_DISABLED_LOAD);
|
||||
} else {
|
||||
unsetArmingDisabled(ARMING_DISABLED_LOAD);
|
||||
}
|
||||
#endif // USE_LATE_TASK_STATISTICS
|
||||
|
||||
if (isCalibrating()) {
|
||||
setArmingDisabled(ARMING_DISABLED_CALIBRATING);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue