mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-06 00:35:44 +08:00
get_vin: respond to full 11-bit diagnostic address range (#31317)
* fix * not 7df * cleaner * whop
This commit is contained in:
@@ -26,8 +26,14 @@ def get_vin(logcan, sendcan, buses, timeout=0.1, retry=3, debug=False):
|
||||
if bus not in valid_buses:
|
||||
continue
|
||||
|
||||
# When querying functional addresses, ideally we respond to everything that sends a first frame to avoid leaving the
|
||||
# ECU in a temporary bad state. Note that we may not cover all ECUs and response offsets. TODO: query physical addrs
|
||||
tx_addrs = vin_addrs
|
||||
if functional_addrs is not None:
|
||||
tx_addrs = [a for a in range(0x700, 0x800) if a != 0x7DF] + list(range(0x18DA00F1, 0x18DB00F1, 0x100))
|
||||
|
||||
try:
|
||||
query = IsoTpParallelQuery(sendcan, logcan, bus, vin_addrs, [request, ], [response, ], response_offset=rx_offset,
|
||||
query = IsoTpParallelQuery(sendcan, logcan, bus, tx_addrs, [request, ], [response, ], response_offset=rx_offset,
|
||||
functional_addrs=functional_addrs, debug=debug)
|
||||
results = query.get_data(timeout)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user