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:
parent
e8a3706351
commit
11d0bbf5f8
@ -55,6 +55,12 @@
|
|||||||
#include <callbackinfo.h>
|
#include <callbackinfo.h>
|
||||||
#include <hwsettings.h>
|
#include <hwsettings.h>
|
||||||
#include <pios_flashfs.h>
|
#include <pios_flashfs.h>
|
||||||
|
|
||||||
|
#ifdef PIOS_INCLUDE_INSTRUMENTATION
|
||||||
|
#include <instrumentation.h>
|
||||||
|
#include <pios_instrumentation.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_RFM22B)
|
#if defined(PIOS_INCLUDE_RFM22B)
|
||||||
#include <oplinkstatus.h>
|
#include <oplinkstatus.h>
|
||||||
#endif
|
#endif
|
||||||
@ -124,7 +130,6 @@ int32_t SystemModStart(void)
|
|||||||
// Register task
|
// Register task
|
||||||
PIOS_TASK_MONITOR_RegisterTask(TASKINFO_RUNNING_SYSTEM, systemTaskHandle);
|
PIOS_TASK_MONITOR_RegisterTask(TASKINFO_RUNNING_SYSTEM, systemTaskHandle);
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,6 +153,10 @@ int32_t SystemModInitialize(void)
|
|||||||
WatchdogStatusInitialize();
|
WatchdogStatusInitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PIOS_INCLUDE_INSTRUMENTATION
|
||||||
|
InstrumentationInit();
|
||||||
|
#endif
|
||||||
|
|
||||||
objectPersistenceQueue = xQueueCreate(1, sizeof(UAVObjEvent));
|
objectPersistenceQueue = xQueueCreate(1, sizeof(UAVObjEvent));
|
||||||
if (objectPersistenceQueue == NULL) {
|
if (objectPersistenceQueue == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -205,6 +214,10 @@ static void systemTask(__attribute__((unused)) void *parameters)
|
|||||||
updateWDGstats();
|
updateWDGstats();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PIOS_INCLUDE_INSTRUMENTATION
|
||||||
|
InstrumentationPublishAllCounters();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DIAG_TASKS
|
#ifdef DIAG_TASKS
|
||||||
// Update the task status object
|
// Update the task status object
|
||||||
PIOS_TASK_MONITOR_ForEachTask(taskMonitorForEachCallback, &taskInfoData);
|
PIOS_TASK_MONITOR_ForEachTask(taskMonitorForEachCallback, &taskInfoData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user