mirror of https://github.com/ArduPilot/ardupilot
waf: add --enable-custom-controller build option
This commit is contained in:
parent
9218cf18ce
commit
661a525dc1
|
@ -114,6 +114,23 @@ class Board:
|
|||
else:
|
||||
cfg.msg("Enabled firmware ID checking", 'no', color='YELLOW')
|
||||
|
||||
# allow enable of custom controller for any board
|
||||
# enabled on sitl by default
|
||||
if (cfg.options.enable_custom_controller or self.get_name() == "sitl") and not cfg.options.no_gcs:
|
||||
env.ENABLE_CUSTOM_CONTROLLER = True
|
||||
env.DEFINES.update(
|
||||
AP_CUSTOMCONTROL_ENABLED=1,
|
||||
)
|
||||
env.AP_LIBRARIES += [
|
||||
'AC_CustomControl'
|
||||
]
|
||||
cfg.msg("Enabled custom controller", 'yes')
|
||||
else:
|
||||
env.DEFINES.update(
|
||||
AP_CUSTOMCONTROL_ENABLED=0,
|
||||
)
|
||||
cfg.msg("Enabled custom controller", 'no', color='YELLOW')
|
||||
|
||||
d = env.get_merged_dict()
|
||||
# Always prepend so that arguments passed in the command line get
|
||||
# the priority.
|
||||
|
|
4
wscript
4
wscript
|
@ -238,6 +238,10 @@ submodules at specific revisions.
|
|||
default=False,
|
||||
help="Enables firmware ID checking on boot")
|
||||
|
||||
g.add_option('--enable-custom-controller', action='store_true',
|
||||
default=False,
|
||||
help="Enables custom controller")
|
||||
|
||||
g = opt.ap_groups['linux']
|
||||
|
||||
linux_options = ('--prefix', '--destdir', '--bindir', '--libdir')
|
||||
|
|
Loading…
Reference in New Issue