Skip to content

Commit

Permalink
migrate lowercase mock (commaai#32074)
Browse files Browse the repository at this point in the history
* add mock migration

* fix

* this
  • Loading branch information
jnewb1 committed Apr 1, 2024
1 parent dbea6ba commit 1c01615
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions selfdrive/car/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from openpilot.selfdrive.car.honda.values import CAR as HONDA
from openpilot.selfdrive.car.hyundai.values import CAR as HYUNDAI
from openpilot.selfdrive.car.mazda.values import CAR as MAZDA
from openpilot.selfdrive.car.mock.values import CAR as MOCK
from openpilot.selfdrive.car.nissan.values import CAR as NISSAN
from openpilot.selfdrive.car.subaru.values import CAR as SUBARU
from openpilot.selfdrive.car.tesla.values import CAR as TESLA
Expand Down Expand Up @@ -338,4 +339,6 @@ def all_legacy_fingerprint_cars():
"SKODA OCTAVIA 3RD GEN": VW.SKODA_OCTAVIA_MK3,
"SKODA SCALA 1ST GEN": VW.SKODA_SCALA_MK1,
"SKODA SUPERB 3RD GEN": VW.SKODA_SUPERB_MK3,

"mock": MOCK.MOCK,
}
3 changes: 2 additions & 1 deletion tools/cabana/dbc/generate_dbc_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def generate_dbc_json() -> str:
dbc_map = {platform.name: platform.config.dbc_dict['pt'] for platform in PLATFORMS.values() if platform != "MOCK"}

for m in MIGRATION:
dbc_map[m] = dbc_map[MIGRATION[m]]
if MIGRATION[m] in dbc_map:
dbc_map[m] = dbc_map[MIGRATION[m]]

return json.dumps(dict(sorted(dbc_map.items())), indent=2)

Expand Down

0 comments on commit 1c01615

Please sign in to comment.