mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-22 03:03:56 +08:00
* Added pyflakes and Pylint for python * Actually run linter in CI * some simple pyflakes changes * Add flake8 to panda reqs for linter test * flake8 errors are fixed * run flake8 in regression tests * meant to run flake8 * hack to ignore unused import * bug * fix bugs in tucan_loopback * Another fix by using set_safety_mode * added pylintrc file * more fixes and enabled pylint as well * Fix pylint in circleci * added linter to readme
17 lines
369 B
Python
Executable File
17 lines
369 B
Python
Executable File
#!/usr/bin/env python3
|
|
from panda import Panda
|
|
|
|
p = Panda()
|
|
p.set_safety_mode(Panda.SAFETY_ALLOUTPUT)
|
|
p.set_gmlan(bus=2)
|
|
#p.can_send(0xaaa, b"\x00\x00", bus=3)
|
|
last_add = None
|
|
while 1:
|
|
ret = p.can_recv()
|
|
if len(ret) > 0:
|
|
add = ret[0][0]
|
|
if last_add is not None and add != last_add + 1:
|
|
print("MISS: ", last_add, add)
|
|
last_add = add
|
|
print(ret)
|