mirror of https://github.com/ArduPilot/ardupilot
waf: added OpenDroneID support
This commit is contained in:
parent
d41c283a5c
commit
21c9c62ed9
|
@ -90,6 +90,7 @@ COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
|
|||
'AC_PID',
|
||||
'AP_SerialLED',
|
||||
'AP_Hott_Telem',
|
||||
'AP_OpenDroneID',
|
||||
]
|
||||
|
||||
def get_legacy_defines(sketch_name):
|
||||
|
|
|
@ -70,6 +70,26 @@ class Board:
|
|||
else:
|
||||
cfg.options.disable_scripting = True;
|
||||
|
||||
# allow enable of OpenDroneID for any board
|
||||
if cfg.options.enable_opendroneid:
|
||||
env.ENABLE_OPENDRONEID = True
|
||||
env.DEFINES.update(
|
||||
AP_OPENDRONEID_ENABLED=1,
|
||||
)
|
||||
cfg.msg("Enabled OpenDroneID", 'yes')
|
||||
else:
|
||||
cfg.msg("Enabled OpenDroneID", 'no', color='YELLOW')
|
||||
|
||||
# allow enable of firmware ID checking for any board
|
||||
if cfg.options.enable_check_firmware:
|
||||
env.CHECK_FIRMWARE_ENABLED = True
|
||||
env.DEFINES.update(
|
||||
AP_CHECK_FIRMWARE_ENABLED=1,
|
||||
)
|
||||
cfg.msg("Enabled firmware ID checking", 'yes')
|
||||
else:
|
||||
cfg.msg("Enabled firmware ID checking", 'no', color='YELLOW')
|
||||
|
||||
d = env.get_merged_dict()
|
||||
# Always prepend so that arguments passed in the command line get
|
||||
# the priority.
|
||||
|
@ -360,6 +380,8 @@ class sitl(Board):
|
|||
AP_SCRIPTING_CHECKS = 1, # SITL should always do runtime scripting checks
|
||||
)
|
||||
|
||||
cfg.define('AP_OPENDRONEID_ENABLED', 1)
|
||||
|
||||
env.CXXFLAGS += [
|
||||
'-Werror=float-equal'
|
||||
]
|
||||
|
|
9
wscript
9
wscript
|
@ -205,6 +205,15 @@ configuration in order to save typing.
|
|||
default=False,
|
||||
help='Force a static build')
|
||||
|
||||
g.add_option('--enable-opendroneid', action='store_true',
|
||||
default=False,
|
||||
help="Enables OpenDroneID")
|
||||
|
||||
g.add_option('--enable-check-firmware', action='store_true',
|
||||
default=False,
|
||||
help="Enables firmware ID checking on boot")
|
||||
|
||||
|
||||
def _collect_autoconfig_files(cfg):
|
||||
for m in sys.modules.values():
|
||||
paths = []
|
||||
|
|
Loading…
Reference in New Issue