ESC_INFO_V2 and ESC_STATUS_V2

Added ESC_FLAGS enum with various failure states.
This commit is contained in:
Hamish Willee
2025-12-04 09:20:06 +11:00
committed by GitHub
parent 83ba296e87
commit 01965aea2b
+51
View File
@@ -468,6 +468,37 @@
<description>BLHeli32 ESC firmware.</description>
</entry>
</enum>
<enum name="ESC_FLAGS" bitmask="true">
<!-- This enum is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
<description>Flags to report ESC status and failures. Used in ESC_INFO_V2.</description>
<entry value="1" name="ESC_FLAGS_OVER_CURRENT">
<description>Over current failure.</description>
</entry>
<entry value="2" name="ESC_FLAGS_OVER_VOLTAGE">
<description>Over voltage failure.</description>
</entry>
<entry value="4" name="ESC_FLAGS_OVER_TEMPERATURE">
<description>Over temperature failure.</description>
</entry>
<entry value="8" name="ESC_FLAGS_OVER_RPM">
<description>Over RPM failure.</description>
</entry>
<entry value="16" name="ESC_FLAGS_FAILURE_INCONSISTENT_CMD">
<description>Inconsistent command failure i.e. out of bounds.</description>
</entry>
<entry value="32" name="ESC_FLAGS_MOTOR_STUCK">
<description>Motor stuck failure.</description>
</entry>
<entry value="64" name="ESC_FLAGS_TIMEOUT">
<description>ESC timeout failure (data not received when expected; published data is stale).</description>
</entry>
<entry value="128" name="ESC_FLAGS_FAILURE_GENERIC">
<description>Generic ESC failure.</description>
</entry>
<entry value="256" name="ESC_FLAGS_OFFLINE">
<description>ESC is offline.</description>
</entry>
</enum>
</enums>
<messages>
<message id="296" name="GLOBAL_POSITION">
@@ -632,5 +663,25 @@
<field type="uint8_t" name="length" maxValue="222">Number of valid bytes in data array.</field>
<field type="uint8_t[192]" name="data">Raw ESC EEPROM data. Unused bytes should be set to zero.</field>
</message>
<message id="292" name="ESC_INFO_V2">
<wip since="2025122025>Deprecates ESC_INFO</wip>
<!-- This message is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
<description>ESC information for lower rate streaming. Each message contains information for up to 4 ESC. The message index is incremented to indicate which set of ESCs are described. Recommended streaming rate 1Hz. See ESC_STATUS_V2 for higher-rate ESC data.</description>
<field type="uint8_t" name="index" instance="true" minValue="0" increment="1" maxValue="25">Message index. ESC data corresponds to ESC_STATUS_V2 message with same index.</field>
<field type="uint8_t" name="count">Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data.</field>
<field type="uint8_t[4]" name="error_percent" invalid="[INT8_MAX]>Percentage of errors vs valid data of each ESC since boot.</field>
<field type="uint16_t[4]" name="flags" enum="ESC_FLAGS">Bitmap of ESC status flags.</field>
<field type="int16_t[4]" name="temperature" units="cdegC" invalid="[INT16_MAX]">Temperature of each ESC.</field>
<field type="float[4]" name="total_current" units="cdegC" invalid="[NaN]">Total current for each ESC.</field>
</message>
<message id="293" name="ESC_STATUS_V2">
<wip since="2025122025>Deprecates ESC_STATUS</wip>
<!-- This message is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
<description>ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO_V2. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer).</description>
<field type="uint8_t" name="index" instance="true" minValue="0" increment="1" maxValue="25">Message index. ESC data corresponds to ESC_INFO_V2 message with same index.</field>
<field type="float[4]" name="rpm" units="rpm" invalid="[NaN]">Reported motor RPM from each ESC (negative for reverse rotation).</field>
<field type="float[4]" name="voltage" units="V" invalid="[NaN]">Voltage measured from each ESC.</field>
<field type="float[4]" name="current" units="A" invalid="[NaN]">Current measured from each ESC.</field>
</message>
</messages>
</mavlink>