IsoTpParallelQuery: extend timeout for each ISO-TP frame (#25897)

* raise timeouts

* extend timeout for each message/frame (not multi-frame full response)

* bump panda

* 100 ms timeout between frames (max I've seen is 20, should be good)

* bump panda

* remove unused

* Add tester present to HKG queries (temp)

* send tester present to all ecus first

* vin and fw_versions.py sleep, should figure out why sendcan drops packets

* None is wildcard (some ecus respond with negative code, that's fine)

* typing

* try bus 0

* revert brand-specific changes

* Update selfdrive/car/isotp_parallel_query.py
pull/25102/head
Shane Smiskol 3 years ago committed by GitHub
parent 2a30da6698
commit 870c5f383d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      panda
  2. 7
      selfdrive/car/isotp_parallel_query.py

@ -1 +1 @@
Subproject commit 10c0991666865feb734120f2544586d461292866 Subproject commit 5984fd35096a9e3f9748435868ad49a199d4404d

@ -1,7 +1,6 @@
import time import time
from collections import defaultdict from collections import defaultdict
from functools import partial from functools import partial
from typing import Optional
import cereal.messaging as messaging import cereal.messaging as messaging
from system.swaglog import cloudlog from system.swaglog import cloudlog
@ -107,12 +106,15 @@ class IsoTpParallelQuery:
for tx_addr, msg in msgs.items(): for tx_addr, msg in msgs.items():
try: try:
dat: Optional[bytes] = msg.recv() dat, updated = msg.recv()
except Exception: except Exception:
cloudlog.exception(f"Error processing UDS response: {tx_addr}") cloudlog.exception(f"Error processing UDS response: {tx_addr}")
request_done[tx_addr] = True request_done[tx_addr] = True
continue continue
if updated:
response_timeouts[tx_addr] = time.monotonic() + timeout
if not dat: if not dat:
continue continue
@ -121,7 +123,6 @@ class IsoTpParallelQuery:
response_valid = dat[:len(expected_response)] == expected_response response_valid = dat[:len(expected_response)] == expected_response
if response_valid: if response_valid:
response_timeouts[tx_addr] = time.monotonic() + timeout
if counter + 1 < len(self.request): if counter + 1 < len(self.request):
msg.send(self.request[counter + 1]) msg.send(self.request[counter + 1])
request_counter[tx_addr] += 1 request_counter[tx_addr] += 1

Loading…
Cancel
Save