mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
openpilot v0.4.7 release
This commit is contained in:
@@ -8,7 +8,7 @@ import selfdrive.messaging as messaging
|
||||
from selfdrive.services import service_list
|
||||
|
||||
|
||||
def can_printer(bus=0, max_msg=0x10000, addr="127.0.0.1"):
|
||||
def can_printer(bus=0, max_msg=None, addr="127.0.0.1"):
|
||||
context = zmq.Context()
|
||||
logcan = messaging.sub_sock(context, service_list['can'].port, addr=addr)
|
||||
|
||||
@@ -27,7 +27,7 @@ def can_printer(bus=0, max_msg=0x10000, addr="127.0.0.1"):
|
||||
dd = chr(27) + "[2J"
|
||||
dd += "%5.2f\n" % (sec_since_boot() - start)
|
||||
for k,v in sorted(zip(msgs.keys(), map(lambda x: x[-1].encode("hex"), msgs.values()))):
|
||||
if k < max_msg:
|
||||
if max_msg is None or k < max_msg:
|
||||
dd += "%s(%6d) %s\n" % ("%04X(%4d)" % (k,k),len(msgs[k]), v)
|
||||
print dd
|
||||
lp = sec_since_boot()
|
||||
|
||||
Reference in New Issue
Block a user