Skip to content

Commit

Permalink
zero pad messages before sending
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjhogan committed Oct 15, 2019
1 parent 1ddc973 commit 01ef1fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def _isotp_thread(panda, bus, tx_addr, tx_queue, rx_queue):
req = tx_queue.get(block=False)
# reset rx rx_frame
rx_frame = {"size": 0, "data": "", "sent": True}
req = req.ljust(8, "\x00")
if (DEBUG): print "S:", hex(tx_addr), req.encode("hex")
panda.can_send(tx_addr, req, bus)
else:
Expand Down Expand Up @@ -643,7 +644,7 @@ def request_transfer_exit(address):
from python import Panda
panda = Panda()
bus = 0
tx_addr = 0x18daf130 # EPS
tx_addr = 0x18da30f1 # EPS
tx_queue = Queue()
rx_queue = Queue()
can_reader_t = threading.Thread(target=_isotp_thread, args=(panda, bus, tx_addr, tx_queue, rx_queue))
Expand Down

0 comments on commit 01ef1fa

Please sign in to comment.