Skip to content

Commit 8203cc8

Browse files
committed
add is_grey
1 parent e946a54 commit 8203cc8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ def enter_bootloader(self):
315315
def get_version(self):
316316
return self._handle.controlRead(Panda.REQUEST_IN, 0xd6, 0, 0, 0x40)
317317

318+
def is_grey(self):
319+
ret = self._handle.controlRead(Panda.REQUEST_IN, 0xc1, 0, 0, 0x40)
320+
return ret == "\x01"
321+
318322
def get_serial(self):
319323
dat = self._handle.controlRead(Panda.REQUEST_IN, 0xd0, 0, 0, 0x20)
320324
hashsig, calc_hash = dat[0x1c:], hashlib.sha1(dat[0:0x1c]).digest()[0:4]

0 commit comments

Comments
 (0)