Toyota: adaptive ACCEL_NET for new long tune (#34034)

* bump

* bump

* fix that

* should be a better way

* raise
This commit is contained in:
Shane Smiskol 2024-11-15 23:16:15 -06:00 committed by GitHub
parent 55b94abfe4
commit 863d86c10c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

@ -1 +1 @@
Subproject commit 40951c19ee2422a3a63eae878aedc9f0e1b255d4 Subproject commit 661a42c91e28c370d90b3c4f0bf0f5a8cf015733

View File

@ -2,12 +2,23 @@
import argparse import argparse
import json import json
from opendbc.car import Bus
from opendbc.car.fingerprints import MIGRATION from opendbc.car.fingerprints import MIGRATION
from opendbc.car.values import PLATFORMS from opendbc.car.values import PLATFORMS
def generate_dbc_json() -> str: def generate_dbc_json() -> str:
dbc_map = {platform.name: platform.config.dbc_dict['pt'] for platform in PLATFORMS.values() if platform != "MOCK"} dbc_map = {}
for platform in PLATFORMS.values():
if platform != "MOCK":
if Bus.pt in platform.config.dbc_dict:
dbc_map[platform.name] = platform.config.dbc_dict[Bus.pt]
elif Bus.main in platform.config.dbc_dict:
dbc_map[platform.name] = platform.config.dbc_dict[Bus.main]
elif Bus.party in platform.config.dbc_dict:
dbc_map[platform.name] = platform.config.dbc_dict[Bus.party]
else:
raise ValueError("Unknown main type")
for m in MIGRATION: for m in MIGRATION:
if MIGRATION[m] in dbc_map: if MIGRATION[m] in dbc_map: