mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
Add option for scheduling policy targeting constant average task rates
This commit is contained in:
parent
2bf2ded102
commit
33741dce75
8 changed files with 52 additions and 4 deletions
|
@ -3766,7 +3766,7 @@ static void cliTasks(char *cmdline)
|
|||
int taskFrequency;
|
||||
int subTaskFrequency = 0;
|
||||
if (taskId == TASK_GYROPID) {
|
||||
subTaskFrequency = taskInfo.latestDeltaTime == 0 ? 0 : (int)(1000000.0f / ((float)taskInfo.latestDeltaTime));
|
||||
subTaskFrequency = taskInfo.movingAverageCycleTime == 0.0f ? 0.0f : (int)(1000000.0f / (taskInfo.movingAverageCycleTime));
|
||||
taskFrequency = subTaskFrequency / pidConfig()->pid_process_denom;
|
||||
if (pidConfig()->pid_process_denom > 1) {
|
||||
cliPrintf("%02d - (%15s) ", taskId, taskInfo.taskName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue