Fixed python health api

master
Robbe 2019-11-15 21:01:46 -08:00
parent b9b79e8b77
commit 6626a54241
1 changed files with 4 additions and 3 deletions

View File

@ -345,8 +345,8 @@ class Panda(object):
# ******************* health *******************
def health(self):
dat = self._handle.controlRead(Panda.REQUEST_IN, 0xd2, 0, 0, 27)
a = struct.unpack("IIIIIBBBBBBB", dat)
dat = self._handle.controlRead(Panda.REQUEST_IN, 0xd2, 0, 0, 28)
a = struct.unpack("IIIIIBBBBBBBB", dat)
return {
"voltage": a[0],
"current": a[1],
@ -359,7 +359,8 @@ class Panda(object):
"gas_interceptor_detected": a[8],
"car_harness_status": a[9],
"usb_power_mode": a[10],
"safety_mode": a[11]
"safety_mode": a[11],
"fault_status": a[12]
}
# ******************* control *******************