Skip to content

Commit

Permalink
add is_grey
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Feb 16, 2018
1 parent e946a54 commit 8203cc8
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 @@ -315,6 +315,10 @@ def enter_bootloader(self):
def get_version(self):
return self._handle.controlRead(Panda.REQUEST_IN, 0xd6, 0, 0, 0x40)

def is_grey(self):
ret = self._handle.controlRead(Panda.REQUEST_IN, 0xc1, 0, 0, 0x40)
return ret == "\x01"

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 8203cc8

Please sign in to comment.