dragonpilot beta3

date: 2023-08-11T23:00:23
commit: af14371afdf5023a178ed6f21a82099ea64dffe4
This commit is contained in:
dragonpilot
2023-08-11 22:56:33 +08:00
parent 393b21e11d
commit 1542fedcd1
142 changed files with 3097 additions and 2831 deletions
+4 -6
View File
@@ -6,10 +6,8 @@ DEBUG = False
def msg(x):
if DEBUG:
print("S:", binascii.hexlify(x))
if len(x) <= 7:
ret = bytes([len(x)]) + x
else:
assert False
assert len(x) <= 7
ret = bytes([len(x)]) + x
return ret.ljust(8, b"\x00")
kmsgs = []
@@ -56,7 +54,7 @@ def isotp_recv_subaddr(panda, addr, bus, sendaddr, subaddr):
dat = msg[2:]
else:
print(binascii.hexlify(msg))
assert False
raise AssertionError
return dat[0:tlen]
@@ -133,7 +131,7 @@ def isotp_recv(panda, addr, bus=0, sendaddr=None, subaddr=None):
tlen = msg[0] & 0xf
dat = msg[1:]
else:
assert False
raise AssertionError
dat = dat[0:tlen]
if DEBUG: