waf: add sitl rgbled option

This commit is contained in:
Peter Barker 2019-05-16 13:41:03 +10:00 committed by Andrew Tridgell
parent 2fa1f041e3
commit 85fe4ae6dd
2 changed files with 13 additions and 0 deletions

View File

@ -357,12 +357,17 @@ class sitl(Board):
if cfg.options.enable_sfml:
if not cfg.check_SFML(env):
cfg.fatal("Failed to find SFML libraries")
if cfg.options.sitl_osd:
env.CXXFLAGS += ['-DWITH_SITL_OSD','-DOSD_ENABLED=ENABLED','-DHAL_HAVE_AP_ROMFS_EMBEDDED_H']
import fnmatch
for f in os.listdir('libraries/AP_OSD/fonts'):
if fnmatch.fnmatch(f, "font*bin"):
env.ROMFS_FILES += [(f,'libraries/AP_OSD/fonts/'+f)]
if cfg.options.sitl_rgbled:
env.CXXFLAGS += ['-DWITH_SITL_RGBLED']
if cfg.options.enable_sfml_audio:
if not cfg.check_SFML_Audio(env):
cfg.fatal("Failed to find SFML Audio libraries")

View File

@ -188,6 +188,14 @@ configuration in order to save typing.
default=False,
help="Enable SFML audio library")
g.add_option('--sitl-osd', action='store_true',
default=False,
help="Enable SITL OSD")
g.add_option('--sitl-rgbled', action='store_true',
default=False,
help="Enable SITL RGBLed")
g.add_option('--sitl-flash-storage',
action='store_true',
default=False,