body: add debug ECU for git hash logging + fw version (#24128)

* non-essential ECU for logging

* bump cereal

* debug ECU

* match_fw_to_car_exact

* comment

* version instead of board date

* add old compatible value

* update_refs
old-commit-hash: 7908fb8829
taco
Igor Biletskyy 3 years ago committed by GitHub
parent 34e0b26dc4
commit f35a445b73
  1. 2
      cereal
  2. 4
      selfdrive/car/body/values.py
  3. 6
      selfdrive/car/fw_versions.py
  4. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit c609a29345dc42c90663cb3705bf9c4c2ee13628
Subproject commit 3d5e7784254ece1b356b47e3327b8e7390b6aa57

@ -24,8 +24,12 @@ CAR_INFO: Dict[str, CarInfo] = {
FW_VERSIONS = {
CAR.BODY: {
(Ecu.engine, 0x720, None): [
b'0.0.01',
b'02/27/2022'
],
(Ecu.debug, 0x721, None): [
b'166bd860' # git hash of the firmware used
],
},
}

@ -208,7 +208,7 @@ def match_fw_to_car_fuzzy(fw_versions_dict, log=True, exclude=None):
# Getting this exactly right isn't crucial, but excluding camera and radar makes it almost
# impossible to get 3 matching versions, even if two models with shared parts are released at the same
# time and only one is in our database.
exclude_types = [Ecu.fwdCamera, Ecu.fwdRadar, Ecu.eps]
exclude_types = [Ecu.fwdCamera, Ecu.fwdRadar, Ecu.eps, Ecu.debug]
# Build lookup table from (addr, subaddr, fw) to list of candidate cars
all_fw_versions = defaultdict(list)
@ -269,6 +269,10 @@ def match_fw_to_car_exact(fw_versions_dict):
if ecu_type not in ESSENTIAL_ECUS and found_version is None:
continue
# Virtual debug ecu doesn't need to match the database
if ecu_type == Ecu.debug:
continue
if found_version not in expected_versions:
invalid.append(candidate)
break

@ -1 +1 @@
7147228e42963ae7170e142bbacf720508ab83d7
fa91a008e1f8078fe02520e31d8b007425194cb8
Loading…
Cancel
Save