Skip to content

Commit

Permalink
Fixed python health api
Browse files Browse the repository at this point in the history
  • Loading branch information
robbederks committed Nov 16, 2019
1 parent b9b79e8 commit 6626a54
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ def call_control_api(self, msg):
# ******************* 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],
Expand All @@ -359,7 +359,8 @@ def health(self):
"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 *******************
Expand Down

0 comments on commit 6626a54

Please sign in to comment.