Skip to content

Commit

Permalink
bad asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Mar 8, 2018
1 parent b2e6c3f commit b65d30c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/isotp.py
Expand Up @@ -61,7 +61,7 @@ def isotp_recv_subaddr(panda, addr, bus, sendaddr, subaddr):
msg = recv(panda, 1, addr, bus)[0]

# TODO: handle other subaddr also communicating
assert ord(msg[0]) == chr(subaddr)
assert ord(msg[0]) == subaddr

if ord(msg[1])&0xf0 == 0x10:
# first
Expand All @@ -74,7 +74,7 @@ def isotp_recv_subaddr(panda, addr, bus, sendaddr, subaddr):

idx = 1
for mm in recv(panda, (tlen-len(dat) + 5)/6, addr, bus):
assert ord(mm[0]) == chr(subaddr)
assert ord(mm[0]) == subaddr
assert ord(mm[1]) == (0x20 | idx)
dat += mm[2:]
idx += 1
Expand Down

0 comments on commit b65d30c

Please sign in to comment.