1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-1153 Add a way to monitor SystemMod stack usage without DIAG_TASKS=y

SystemStats.SystemModStackRemaining field does contains the relevant information.
This commit is contained in:
Alessio Morale 2014-01-05 23:28:31 +01:00
parent 3aa7a1d352
commit fff060ed9d
2 changed files with 2 additions and 0 deletions

View File

@ -532,6 +532,7 @@ static void updateStats()
// Get Irq stack status
stats.IRQStackRemaining = GetFreeIrqStackSize();
stats.SystemModStackRemaining = uxTaskGetStackHighWaterMark( NULL ) * 4;
// When idleCounterClear was not reset by the idle-task, it means the idle-task did not run
if (idleCounterClear) {
idleCounter = 0;

View File

@ -4,6 +4,7 @@
<field name="FlightTime" units="ms" type="uint32" elements="1"/>
<field name="HeapRemaining" units="bytes" type="uint16" elements="1"/>
<field name="IRQStackRemaining" units="bytes" type="uint16" elements="1"/>
<field name="SystemModStackRemaining" units="bytes" type="uint16" elements="1"/>
<field name="CPULoad" units="%" type="uint8" elements="1"/>
<field name="CPUTemp" units="C" type="int8" elements="1"/>
<field name="EventSystemWarningID" units="uavoid" type="uint32" elements="1"/>