mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Tools: create_OEM_board.py: include defaults.parm, don't copy it
This commit is contained in:
parent
cd2a30ccda
commit
87909b5187
@ -11,6 +11,8 @@ import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
import pathlib
|
||||
|
||||
board_name = sys.argv[1]
|
||||
oem_board_name = sys.argv[2]
|
||||
|
||||
@ -26,8 +28,5 @@ if not os.path.exists("libraries/AP_HAL_ChibiOS/hwdef/%s" % oem_board_name):
|
||||
f.write("include ../%s/hwdef-bl.dat" % board_name)
|
||||
f.close()
|
||||
if os.path.exists("libraries/AP_HAL_ChibiOS/hwdef/%s/defaults.parm" % board_name):
|
||||
subprocess.run([
|
||||
"cp",
|
||||
"libraries/AP_HAL_ChibiOS/hwdef/%s/defaults.parm" % board_name,
|
||||
"libraries/AP_HAL_ChibiOS/hwdef/%s/defaults.parm" % oem_board_name,
|
||||
])
|
||||
path = pathlib.Path(f"libraries/AP_HAL_ChibiOS/hwdef/{oem_board_name}/defaults.parm")
|
||||
path.write_text(f"@include ../{board_name}/defaults.parm\n") # noqa
|
||||
|
Loading…
Reference in New Issue
Block a user