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
2 changed files with 13 additions and 2 deletions
+12 -1
View File
@@ -2,12 +2,23 @@
import argparse
import json
from opendbc.car import Bus
from opendbc.car.fingerprints import MIGRATION
from opendbc.car.values import PLATFORMS
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:
if MIGRATION[m] in dbc_map: