mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +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:
parent
3aa7a1d352
commit
fff060ed9d
@ -532,6 +532,7 @@ static void updateStats()
|
|||||||
// Get Irq stack status
|
// Get Irq stack status
|
||||||
stats.IRQStackRemaining = GetFreeIrqStackSize();
|
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
|
// When idleCounterClear was not reset by the idle-task, it means the idle-task did not run
|
||||||
if (idleCounterClear) {
|
if (idleCounterClear) {
|
||||||
idleCounter = 0;
|
idleCounter = 0;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<field name="FlightTime" units="ms" type="uint32" elements="1"/>
|
<field name="FlightTime" units="ms" type="uint32" elements="1"/>
|
||||||
<field name="HeapRemaining" units="bytes" type="uint16" elements="1"/>
|
<field name="HeapRemaining" units="bytes" type="uint16" elements="1"/>
|
||||||
<field name="IRQStackRemaining" 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="CPULoad" units="%" type="uint8" elements="1"/>
|
||||||
<field name="CPUTemp" units="C" type="int8" elements="1"/>
|
<field name="CPUTemp" units="C" type="int8" elements="1"/>
|
||||||
<field name="EventSystemWarningID" units="uavoid" type="uint32" elements="1"/>
|
<field name="EventSystemWarningID" units="uavoid" type="uint32" elements="1"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user