mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Merge pull request #6297 from DieHertz/bfdev-hertz-cli-task-statistics-reset-max-time
CLI tasks command: reset max execution time
This commit is contained in:
commit
ea53a18ae0
4 changed files with 17 additions and 0 deletions
|
@ -3634,6 +3634,8 @@ static void cliTasks(char *cmdline)
|
|||
if (taskId == TASK_GYROPID && pidConfig()->pid_process_denom > 1) {
|
||||
cliPrintLinef(" - (%15s) %6d", taskInfo.subTaskName, subTaskFrequency);
|
||||
}
|
||||
|
||||
schedulerResetTaskMaxExecutionTime(taskId);
|
||||
}
|
||||
}
|
||||
if (systemConfig()->task_statistics) {
|
||||
|
|
|
@ -221,6 +221,19 @@ void schedulerResetTaskStatistics(cfTaskId_e taskId)
|
|||
#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)
|
||||
{
|
||||
calculateTaskStatistics = true;
|
||||
|
|
|
@ -177,6 +177,7 @@ void setTaskEnabled(cfTaskId_e taskId, bool newEnabledState);
|
|||
timeDelta_t getTaskDeltaTime(cfTaskId_e taskId);
|
||||
void schedulerSetCalulateTaskStatistics(bool calculateTaskStatistics);
|
||||
void schedulerResetTaskStatistics(cfTaskId_e taskId);
|
||||
void schedulerResetTaskMaxExecutionTime(cfTaskId_e taskId);
|
||||
|
||||
void schedulerInit(void);
|
||||
void scheduler(void);
|
||||
|
|
|
@ -240,6 +240,7 @@ const char *armingDisableFlagNames[]= {
|
|||
|
||||
void getTaskInfo(cfTaskId_e, cfTaskInfo_t *) {}
|
||||
void getCheckFuncInfo(cfCheckFuncInfo_t *) {}
|
||||
void schedulerResetTaskMaxExecutionTime(cfTaskId_e) {}
|
||||
|
||||
const char * const targetName = "UNITTEST";
|
||||
const char* const buildDate = "Jan 01 2017";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue