Browse Source

waf: add --enable-custom-controller build option

master_rangefinder
esaldiran 2 years ago committed by Peter Barker
parent
commit
661a525dc1
  1. 17
      Tools/ardupilotwaf/boards.py
  2. 4
      wscript

17
Tools/ardupilotwaf/boards.py

@ -114,6 +114,23 @@ class Board: @@ -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

@ -238,6 +238,10 @@ submodules at specific revisions. @@ -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…
Cancel
Save