Calculate interrupt load and add to health packet (#913)

* calculate interrupt load

* forgot to change this

* being cautious about overflows

* utils

* fix bootstub

* cleanup

* also exclude pedal

* fix misra

Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
Robbe Derks
2022-04-11 11:59:47 +02:00
committed by GitHub
parent f088af5664
commit cc0fdffee6
9 changed files with 50 additions and 10 deletions

View File

@@ -170,8 +170,8 @@ class Panda(object):
HW_TYPE_RED_PANDA = b'\x07'
CAN_PACKET_VERSION = 2
HEALTH_PACKET_VERSION = 4
HEALTH_STRUCT = struct.Struct("<IIIIIIIIBBBBBBBHBBBHI")
HEALTH_PACKET_VERSION = 5
HEALTH_STRUCT = struct.Struct("<IIIIIIIIBBBBBBBHBBBHIf")
F2_DEVICES = (HW_TYPE_PEDAL, )
F4_DEVICES = (HW_TYPE_WHITE_PANDA, HW_TYPE_GREY_PANDA, HW_TYPE_BLACK_PANDA, HW_TYPE_UNO, HW_TYPE_DOS)
@@ -387,6 +387,7 @@ class Panda(object):
"heartbeat_lost": a[18],
"alternative_experience": a[19],
"blocked_msg_cnt": a[20],
"interrupt_load": a[21],
}
# ******************* control *******************