mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
Added reset of task max time to CLI tasks command
This commit is contained in:
parent
ad975d3948
commit
5a66fb510f
3 changed files with 16 additions and 0 deletions
|
@ -3634,6 +3634,8 @@ static void cliTasks(char *cmdline)
|
||||||
if (taskId == TASK_GYROPID && pidConfig()->pid_process_denom > 1) {
|
if (taskId == TASK_GYROPID && pidConfig()->pid_process_denom > 1) {
|
||||||
cliPrintLinef(" - (%15s) %6d", taskInfo.subTaskName, subTaskFrequency);
|
cliPrintLinef(" - (%15s) %6d", taskInfo.subTaskName, subTaskFrequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
schedulerResetTaskMaxExecutionTime(taskId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (systemConfig()->task_statistics) {
|
if (systemConfig()->task_statistics) {
|
||||||
|
|
|
@ -221,6 +221,19 @@ void schedulerResetTaskStatistics(cfTaskId_e taskId)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void schedulerResetTaskMaxExecutionTime(cfTaskId_e taskId)
|
||||||
|
{
|
||||||
|
#ifdef SKIP_TASK_STATISTICS
|
||||||
|
UNUSED(taskId);
|
||||||
|
#else
|
||||||
|
if (taskId == TASK_SELF) {
|
||||||
|
currentTask->maxExecutionTime = 0;
|
||||||
|
} else if (taskId < TASK_COUNT) {
|
||||||
|
cfTasks[taskId].maxExecutionTime = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void schedulerInit(void)
|
void schedulerInit(void)
|
||||||
{
|
{
|
||||||
calculateTaskStatistics = true;
|
calculateTaskStatistics = true;
|
||||||
|
|
|
@ -177,6 +177,7 @@ void setTaskEnabled(cfTaskId_e taskId, bool newEnabledState);
|
||||||
timeDelta_t getTaskDeltaTime(cfTaskId_e taskId);
|
timeDelta_t getTaskDeltaTime(cfTaskId_e taskId);
|
||||||
void schedulerSetCalulateTaskStatistics(bool calculateTaskStatistics);
|
void schedulerSetCalulateTaskStatistics(bool calculateTaskStatistics);
|
||||||
void schedulerResetTaskStatistics(cfTaskId_e taskId);
|
void schedulerResetTaskStatistics(cfTaskId_e taskId);
|
||||||
|
void schedulerResetTaskMaxExecutionTime(cfTaskId_e taskId);
|
||||||
|
|
||||||
void schedulerInit(void);
|
void schedulerInit(void);
|
||||||
void scheduler(void);
|
void scheduler(void);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue