Skip to content

Commit

Permalink
uds: clear rx buffer on drain
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjhogan committed Feb 6, 2020
1 parent 3b20804 commit 73a60d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ def _recv_buffer(self, drain: bool=False) -> None:
msgs = self.rx()
if drain:
if self.debug: print("CAN-RX: drain - {}".format(len(msgs)))
self.rx_buff.clear()
else:
for rx_addr, rx_ts, rx_data, rx_bus in msgs or []:
if self._recv_filter(rx_bus, rx_addr) and len(rx_data) > 0:
Expand Down

0 comments on commit 73a60d5

Please sign in to comment.