Skip to content

Commit

Permalink
put is_internal() back for openpilot pandad.py
Browse files Browse the repository at this point in the history
  • Loading branch information
briskspirit committed Aug 31, 2022
1 parent 77cfc32 commit 6d2e2bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class Panda:
F4_DEVICES = (HW_TYPE_WHITE_PANDA, HW_TYPE_GREY_PANDA, HW_TYPE_BLACK_PANDA, HW_TYPE_UNO, HW_TYPE_DOS)
H7_DEVICES = (HW_TYPE_RED_PANDA, )

INTERNAL_DEVICES = (HW_TYPE_UNO, HW_TYPE_DOS)
HAS_OBD = (HW_TYPE_BLACK_PANDA, HW_TYPE_UNO, HW_TYPE_DOS, HW_TYPE_RED_PANDA)

CLOCK_SOURCE_MODE_DISABLED = 0
Expand Down Expand Up @@ -513,6 +514,9 @@ def get_mcu_type(self):
def has_obd(self):
return self.get_type() in Panda.HAS_OBD

def is_internal(self):
return self.get_type() in Panda.INTERNAL_DEVICES

def get_serial(self):
dat = self._handle.controlRead(Panda.REQUEST_IN, 0xd0, 0, 0, 0x20)
hashsig, calc_hash = dat[0x1c:], hashlib.sha1(dat[0:0x1c]).digest()[0:4]
Expand Down

0 comments on commit 6d2e2bd

Please sign in to comment.