mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
waf: added OpenDroneID support
This commit is contained in:
parent
6a4710938c
commit
86e7c09cf0
@ -107,6 +107,8 @@ COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
|
|||||||
'AP_ExternalAHRS',
|
'AP_ExternalAHRS',
|
||||||
'AP_VideoTX',
|
'AP_VideoTX',
|
||||||
'AP_FETtecOneWire',
|
'AP_FETtecOneWire',
|
||||||
|
'AP_CheckFirmware',
|
||||||
|
'AP_OpenDroneID',
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_legacy_defines(sketch_name):
|
def get_legacy_defines(sketch_name):
|
||||||
|
@ -67,6 +67,26 @@ class Board:
|
|||||||
# allow GCS disable for AP_DAL example
|
# allow GCS disable for AP_DAL example
|
||||||
if cfg.options.no_gcs:
|
if cfg.options.no_gcs:
|
||||||
env.CXXFLAGS += ['-DHAL_NO_GCS=1']
|
env.CXXFLAGS += ['-DHAL_NO_GCS=1']
|
||||||
|
|
||||||
|
# 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()
|
d = env.get_merged_dict()
|
||||||
# Always prepend so that arguments passed in the command line get
|
# Always prepend so that arguments passed in the command line get
|
||||||
@ -461,6 +481,7 @@ class sitl(Board):
|
|||||||
AP_SCRIPTING_CHECKS = 1, # SITL should always do runtime scripting checks
|
AP_SCRIPTING_CHECKS = 1, # SITL should always do runtime scripting checks
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cfg.define('AP_OPENDRONEID_ENABLED', 1)
|
||||||
|
|
||||||
if self.with_can:
|
if self.with_can:
|
||||||
cfg.define('HAL_NUM_CAN_IFACES', 2)
|
cfg.define('HAL_NUM_CAN_IFACES', 2)
|
||||||
|
11
wscript
11
wscript
@ -271,7 +271,16 @@ configuration in order to save typing.
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='force single precision postype_t')
|
help='force single precision postype_t')
|
||||||
|
|
||||||
|
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):
|
def _collect_autoconfig_files(cfg):
|
||||||
for m in sys.modules.values():
|
for m in sys.modules.values():
|
||||||
paths = []
|
paths = []
|
||||||
|
Loading…
Reference in New Issue
Block a user