1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

OP-1365 Flight code instrumentation API: Use systemMod to publish counters

This commit is contained in:
Alessio Morale 2014-06-07 17:43:36 +02:00
parent e8a3706351
commit 11d0bbf5f8

View File

@ -55,6 +55,12 @@
#include <callbackinfo.h>
#include <hwsettings.h>
#include <pios_flashfs.h>
#ifdef PIOS_INCLUDE_INSTRUMENTATION
#include <instrumentation.h>
#include <pios_instrumentation.h>
#endif
#if defined(PIOS_INCLUDE_RFM22B)
#include <oplinkstatus.h>
#endif
@ -124,7 +130,6 @@ int32_t SystemModStart(void)
// Register task
PIOS_TASK_MONITOR_RegisterTask(TASKINFO_RUNNING_SYSTEM, systemTaskHandle);
return 0;
}
@ -148,6 +153,10 @@ int32_t SystemModInitialize(void)
WatchdogStatusInitialize();
#endif
#ifdef PIOS_INCLUDE_INSTRUMENTATION
InstrumentationInit();
#endif
objectPersistenceQueue = xQueueCreate(1, sizeof(UAVObjEvent));
if (objectPersistenceQueue == NULL) {
return -1;
@ -205,6 +214,10 @@ static void systemTask(__attribute__((unused)) void *parameters)
updateWDGstats();
#endif
#ifdef PIOS_INCLUDE_INSTRUMENTATION
InstrumentationPublishAllCounters();
#endif
#ifdef DIAG_TASKS
// Update the task status object
PIOS_TASK_MONITOR_ForEachTask(taskMonitorForEachCallback, &taskInfoData);