mirror of https://github.com/commaai/openpilot.git
Toyota: adaptive ACCEL_NET for new long tune (#34034)
* bump * bump * fix that * should be a better way * raise
This commit is contained in:
parent
55b94abfe4
commit
863d86c10c
|
@ -1 +1 @@
|
||||||
Subproject commit 40951c19ee2422a3a63eae878aedc9f0e1b255d4
|
Subproject commit 661a42c91e28c370d90b3c4f0bf0f5a8cf015733
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue