1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 00:05:28 +03:00

Merge branch 'scheduler-queue'

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2016-03-18 10:50:00 +10:00
commit ddc75033ef
13 changed files with 872 additions and 296 deletions

View file

@ -24,9 +24,10 @@
#include <ctype.h>
#include "platform.h"
#include "scheduler.h"
#include "version.h"
#include "scheduler/scheduler.h"
#include "build_config.h"
#include "common/axis.h"
@ -2442,11 +2443,13 @@ static void cliTasks(char *cmdline)
cfTaskId_e taskId;
cfTaskInfo_t taskInfo;
cliPrintf("Task list:\r\n");
cliPrintf("Task list max/us avg/us rate/hz total/ms\r\n");
for (taskId = 0; taskId < TASK_COUNT; taskId++) {
getTaskInfo(taskId, &taskInfo);
if (taskInfo.isEnabled) {
cliPrintf("%d - %s, max = %d us, avg = %d us, total = %d ms\r\n", taskId, taskInfo.taskName, taskInfo.maxExecutionTime, taskInfo.averageExecutionTime, taskInfo.totalExecutionTime / 1000);
const uint16_t taskFrequency = (uint16_t)(1.0f / ((float)taskInfo.latestDeltaTime * 0.000001f));
cliPrintf("%2d - %12s, %6d, %5d, %5d, %8d\r\n",
taskId, taskInfo.taskName, taskInfo.maxExecutionTime, taskInfo.averageExecutionTime, taskFrequency, taskInfo.totalExecutionTime / 1000);
}
}
}