add fan stall count to health (#1355)

* add fan stall count to health

* fix misra

---------

Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
Adeeb Shihadeh
2023-04-20 13:30:56 -07:00
committed by GitHub
parent 0e2eb9c0f5
commit 3c75a8bc00
4 changed files with 8 additions and 3 deletions

View File

@@ -182,9 +182,9 @@ class Panda:
HW_TYPE_TRES = b'\x09'
CAN_PACKET_VERSION = 4
HEALTH_PACKET_VERSION = 12
HEALTH_PACKET_VERSION = 13
CAN_HEALTH_PACKET_VERSION = 4
HEALTH_STRUCT = struct.Struct("<IIIIIIIIIBBBBBBHBBBHfBBH")
HEALTH_STRUCT = struct.Struct("<IIIIIIIIIBBBBBBHBBBHfBBHB")
CAN_HEALTH_STRUCT = struct.Struct("<BIBBBBBBBBIIIIIIIHHBBB")
F2_DEVICES = (HW_TYPE_PEDAL, )
@@ -565,6 +565,7 @@ class Panda:
"fan_power": a[21],
"safety_rx_checks_invalid": a[22],
"spi_checksum_error_count": a[23],
"fan_stall_count": a[24],
}
@ensure_can_health_packet_version