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

Report running time per loop in us

This commit is contained in:
James Cotton 2011-08-21 00:54:31 -05:00
parent e1afc9a19a
commit a642f3672c
2 changed files with 4 additions and 5 deletions

View File

@ -223,7 +223,7 @@ int main()
// Get any mag data available
process_mag_data();
status.IdleTimePerCyle = PIOS_DELAY_DiffuS(time_val1) / 10;
status.IdleTimePerCycle = PIOS_DELAY_DiffuS(time_val1);
if(ISNAN(accel_data.filtered.x + accel_data.filtered.y + accel_data.filtered.z) ||
ISNAN(gyro_data.filtered.x + gyro_data.filtered.y + gyro_data.filtered.z) ||
@ -256,7 +256,7 @@ int main()
break;
}
status.RunningTimePerCyle = PIOS_DELAY_DiffuS(time_val2) / 10;
status.RunningTimePerCycle = PIOS_DELAY_DiffuS(time_val2);
AhrsStatusSet(&status);
}

View File

@ -4,9 +4,8 @@
<field name="SerialNumber" units="" type="uint8" elements="8"/>
<field name="CPULoad" units="count" type="uint8" elements="1"/>
<field name="RunningTime" units="ms" type="uint32" elements="1"/>
<field name="IdleTimePerCyle" units="10x ms" type="uint8" elements="1"/>
<field name="RunningTimePerCyle" units="10x ms" type="uint8" elements="1"/>
<field name="DroppedUpdates" units="count" type="uint8" elements="1"/>
<field name="IdleTimePerCycle" units="us" type="uint16" elements="1"/>
<field name="RunningTimePerCycle" units="us" type="uint16" elements="1"/>
<field name="LinkRunning" units="" type="enum" elements="1" options="FALSE,TRUE"/>
<field name="AhrsKickstarts" units="count" type="uint8" elements="1"/>