mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-13 21:32:14 +08:00
FPv2: log query request and response address (#24733)
* log fw query response offset * one line still * log request bytes as well * bump cereal * prettier order * bump cereal * I wonder if the radar sends a response pending... debug dont cache fix debug * Revert "I wonder if the radar sends a response pending..." This reverts commit 12a9552c27ac427c161c27f916fb4fd1a8e4b44c. * log addr too * bump cereal old-commit-hash: 124f3f02d5c14048e5698353201950f89ce2b318
This commit is contained in:
+1
-1
Submodule cereal updated: a36a91ed09...61cee7c2a7
@@ -333,18 +333,20 @@ def get_fw_versions(logcan, sendcan, extra=None, timeout=0.1, debug=False, progr
|
||||
if addrs:
|
||||
query = IsoTpParallelQuery(sendcan, logcan, r.bus, addrs, r.request, r.response, r.rx_offset, debug=debug)
|
||||
t = 2 * timeout if i == 0 else timeout
|
||||
fw_versions.update(query.get_data(t))
|
||||
fw_versions.update({addr: (version, r.request, r.rx_offset) for addr, version in query.get_data(t).items()})
|
||||
except Exception:
|
||||
cloudlog.warning(f"FW query exception: {traceback.format_exc()}")
|
||||
|
||||
# Build capnp list to put into CarParams
|
||||
car_fw = []
|
||||
for addr, version in fw_versions.items():
|
||||
for addr, (version, request, rx_offset) in fw_versions.items():
|
||||
f = car.CarParams.CarFw.new_message()
|
||||
|
||||
f.ecu = ecu_types[addr]
|
||||
f.fwVersion = version
|
||||
f.address = addr[0]
|
||||
f.responseAddress = addr[0] + rx_offset
|
||||
f.request = request
|
||||
|
||||
if addr[1] is not None:
|
||||
f.subAddress = addr[1]
|
||||
|
||||
@@ -132,7 +132,7 @@ class IsoTpParallelQuery:
|
||||
request_done[tx_addr] = True
|
||||
else:
|
||||
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()
|
||||
if cur_time - last_response_time > timeout:
|
||||
|
||||
Reference in New Issue
Block a user