diff --git a/opendbc/dbc/SConscript b/opendbc/dbc/SConscript index 4b0cff324c..fd8d84529e 100644 --- a/opendbc/dbc/SConscript +++ b/opendbc/dbc/SConscript @@ -16,8 +16,15 @@ output_files = [ if not f.name.startswith("_") ] +# include DBCs generated by python scripts +output_files += [ + f.name.replace(".py", "_generated.dbc") + for f in Path("generator").rglob("*.py") + if not f.name.startswith(("_", "test_")) and f.name != "generator.py" +] + generated = env.Command( target=output_files, source=[generator] + source_files, action="python3 ${SOURCES[0]}", -) \ No newline at end of file +) diff --git a/opendbc/dbc/generator/tesla/radar_common.py b/opendbc/dbc/generator/tesla/_radar_common.py similarity index 100% rename from opendbc/dbc/generator/tesla/radar_common.py rename to opendbc/dbc/generator/tesla/_radar_common.py diff --git a/opendbc/dbc/generator/tesla/tesla_radar_bosch.py b/opendbc/dbc/generator/tesla/tesla_radar_bosch.py index 6518c27436..6586655ec0 100755 --- a/opendbc/dbc/generator/tesla/tesla_radar_bosch.py +++ b/opendbc/dbc/generator/tesla/tesla_radar_bosch.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import os -from opendbc.dbc.generator.tesla.radar_common import get_radar_point_definition, get_val_definition +from opendbc.dbc.generator.tesla._radar_common import get_radar_point_definition, get_val_definition if __name__ == "__main__": dbc_name = os.path.basename(__file__).replace(".py", ".dbc") diff --git a/opendbc/dbc/generator/tesla/tesla_radar_continental.py b/opendbc/dbc/generator/tesla/tesla_radar_continental.py index 1279bf1f21..36355d4a03 100755 --- a/opendbc/dbc/generator/tesla/tesla_radar_continental.py +++ b/opendbc/dbc/generator/tesla/tesla_radar_continental.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import os -from opendbc.dbc.generator.tesla.radar_common import get_radar_point_definition, get_val_definition +from opendbc.dbc.generator.tesla._radar_common import get_radar_point_definition, get_val_definition if __name__ == "__main__": dbc_name = os.path.basename(__file__).replace(".py", ".dbc")