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
This commit is contained in:
Igor Biletskyy
2022-04-05 18:24:06 -07:00
committed by GitHub
parent 34e0b26dc4
commit f35a445b73
4 changed files with 11 additions and 3 deletions
+1 -1
Submodule cereal updated: c609a29345...3d5e778425
+4
View File
@@ -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
],
},
}
+5 -1
View File
@@ -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
View File
@@ -1 +1 @@
7147228e42963ae7170e142bbacf720508ab83d7
fa91a008e1f8078fe02520e31d8b007425194cb8