Skip to content

Commit

Permalink
Added has_obd() to python library
Browse files Browse the repository at this point in the history
  • Loading branch information
robbederks committed Nov 6, 2019
1 parent 48e5b18 commit f2cbec1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ def is_black(self):
def is_uno(self):
return self.get_type() == Panda.HW_TYPE_UNO

def has_obd(self):
return (self.is_uno() or self.is_black())

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 f2cbec1

Please sign in to comment.