mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Tools: embed default.param files for Linux boards
This commit is contained in:
parent
42d1fd984c
commit
2b9d56c252
@ -1000,6 +1000,15 @@ class linux(Board):
|
|||||||
if cfg.options.apstatedir:
|
if cfg.options.apstatedir:
|
||||||
cfg.define('AP_STATEDIR', cfg.options.apstatedir)
|
cfg.define('AP_STATEDIR', cfg.options.apstatedir)
|
||||||
|
|
||||||
|
defaults_file = 'libraries/AP_HAL_Linux/boards/%s/defaults.parm' % self.get_name()
|
||||||
|
if os.path.exists(defaults_file):
|
||||||
|
env.ROMFS_FILES += [('defaults.parm', defaults_file)]
|
||||||
|
env.DEFINES.update(
|
||||||
|
HAL_PARAM_DEFAULTS_PATH='"@ROMFS/defaults.parm"',
|
||||||
|
)
|
||||||
|
if len(env.ROMFS_FILES) > 0:
|
||||||
|
env.CXXFLAGS += ['-DHAL_HAVE_AP_ROMFS_EMBEDDED_H']
|
||||||
|
|
||||||
def build(self, bld):
|
def build(self, bld):
|
||||||
super(linux, self).build(bld)
|
super(linux, self).build(bld)
|
||||||
if bld.options.upload:
|
if bld.options.upload:
|
||||||
|
Loading…
Reference in New Issue
Block a user