I wonder if the radar sends a response pending...

debug

dont cache

fix

debug
pull/24733/head
Shane Smiskol 3 years ago
parent 78897a60f6
commit 12a9552c27
  1. 2
      selfdrive/car/car_helpers.py
  2. 6
      selfdrive/car/isotp_parallel_query.py

@ -102,7 +102,7 @@ def fingerprint(logcan, sendcan):
if cached_params.carName == "mock": if cached_params.carName == "mock":
cached_params = None cached_params = None
if cached_params is not None and len(cached_params.carFw) > 0 and cached_params.carVin is not VIN_UNKNOWN: if False and cached_params is not None and len(cached_params.carFw) > 0 and cached_params.carVin is not VIN_UNKNOWN:
cloudlog.warning("Using cached CarParams") cloudlog.warning("Using cached CarParams")
vin = cached_params.carVin vin = cached_params.carVin
car_fw = list(cached_params.carFw) car_fw = list(cached_params.carFw)

@ -124,6 +124,7 @@ class IsoTpParallelQuery:
if response_valid: if response_valid:
last_response_time = time.monotonic() last_response_time = time.monotonic()
cloudlog.warning(f"iso-tp got query response: {tx_addr}, {time.monotonic()}")
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
@ -131,8 +132,11 @@ class IsoTpParallelQuery:
results[tx_addr] = dat[len(expected_response):] results[tx_addr] = dat[len(expected_response):]
request_done[tx_addr] = True request_done[tx_addr] = True
else: else:
error_code = dat[2] if len(dat) > 2 else -1
if error_code == 0x78:
cloudlog.warning(f"iso-tp query response pending: {tx_addr}, {time.monotonic()}")
request_done[tx_addr] = True request_done[tx_addr] = True
cloudlog.warning(f"iso-tp query bad response: 0x{dat.hex()}") cloudlog.warning(f"iso-tp query bad response: {tx_addr} - 0x{dat.hex()}")
cur_time = time.monotonic() cur_time = time.monotonic()
if cur_time - last_response_time > timeout: if cur_time - last_response_time > timeout:

Loading…
Cancel
Save