From 63c167c18333b05054f5bd77813ddb092725c14d Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Sat, 11 Aug 2012 18:46:45 -0400 Subject: [PATCH] taskinfo: also track Event thread's stack usage and CPU utilization The event dispatcher thread is started differently than most other threads so it was missed in the taskinfo tracking information. Now it's also included. --- flight/UAVObjects/eventdispatcher.c | 3 +++ shared/uavobjectdefinition/taskinfo.xml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/flight/UAVObjects/eventdispatcher.c b/flight/UAVObjects/eventdispatcher.c index a5a728b62..e0ffbc99a 100644 --- a/flight/UAVObjects/eventdispatcher.c +++ b/flight/UAVObjects/eventdispatcher.c @@ -280,6 +280,9 @@ static void eventTask() int32_t delayMs; EventCallbackInfo evInfo; + /* Must do this in task context to ensure that TaskMonitor has already finished its init */ + TaskMonitorAdd(TASKINFO_RUNNING_EVENTDISPATCHER, eventTaskHandle); + // Initialize time timeToNextUpdateMs = xTaskGetTickCount()*portTICK_RATE_MS; diff --git a/shared/uavobjectdefinition/taskinfo.xml b/shared/uavobjectdefinition/taskinfo.xml index 40f0d4bdf..551167501 100644 --- a/shared/uavobjectdefinition/taskinfo.xml +++ b/shared/uavobjectdefinition/taskinfo.xml @@ -1,9 +1,9 @@ Task information - - - + + +