preview: what multiple DIDs per ECU would look like in the future

pull/31221/head
Shane Smiskol 1 year ago
parent 977eee6eb6
commit 88f0d8611e
  1. 1
      selfdrive/car/fw_query_definitions.py
  2. 14
      selfdrive/car/gm/fingerprints.py
  3. 17
      selfdrive/car/gm/values.py

@ -65,6 +65,7 @@ class StdQueries:
@dataclass @dataclass
class Request: class Request:
label: str
request: List[bytes] request: List[bytes]
response: List[bytes] response: List[bytes]
whitelist_ecus: List[int] = field(default_factory=list) whitelist_ecus: List[int] = field(default_factory=list)

@ -58,6 +58,16 @@ FINGERPRINTS = {
}], }],
} }
FW_VERSIONS: dict[str, dict[tuple, list[bytes]]] = { FW_VERSIONS = {
CAR.BOLT_EUV: {}, CAR.BOLT_EUV: {
# Require all to exact or fuzzy function match
(Ecu.fwdCamera, 0x24b, None): {
'SoftwareModule1': [
b'\x02\x8c\xf0)' # 42790953
],
'EndModelPartNumber': [
b"\x02\x8c\xf0'", # 42790951
],
}
},
} }

@ -169,15 +169,24 @@ GM_FW_REQUESTS = [
GM_RX_OFFSET = 0x400 GM_RX_OFFSET = 0x400
FW_QUERY_CONFIG = FwQueryConfig( FW_QUERY_CONFIG = FwQueryConfig(
requests=[request for req in GM_FW_REQUESTS for request in [ requests=[
Request( Request(
[StdQueries.SHORT_TESTER_PRESENT_REQUEST, req], "EndModelPartNumber",
[StdQueries.SHORT_TESTER_PRESENT_RESPONSE, GM_FW_RESPONSE + bytes([req[-1]])], [StdQueries.SHORT_TESTER_PRESENT_REQUEST, GM_END_MODEL_PART_NUMBER_REQUEST],
[StdQueries.SHORT_TESTER_PRESENT_RESPONSE, GM_FW_RESPONSE + bytes([GM_END_MODEL_PART_NUMBER_REQUEST[-1]])],
rx_offset=GM_RX_OFFSET, rx_offset=GM_RX_OFFSET,
bus=0, bus=0,
logging=True, logging=True,
), ),
]], Request(
"SoftwareModule1",
[StdQueries.SHORT_TESTER_PRESENT_REQUEST, GM_SOFTWARE_MODULE_1_REQUEST],
[StdQueries.SHORT_TESTER_PRESENT_RESPONSE, GM_FW_RESPONSE + bytes([GM_SOFTWARE_MODULE_1_REQUEST[-1]])],
rx_offset=GM_RX_OFFSET,
bus=0,
logging=True,
),
],
extra_ecus=[(Ecu.fwdCamera, 0x24b, None)], extra_ecus=[(Ecu.fwdCamera, 0x24b, None)],
) )

Loading…
Cancel
Save