waf: added --osd-fonts configure option

allows for --osd without fonts
This commit is contained in:
Andrew Tridgell 2020-08-31 15:31:14 +10:00
parent 491e82159c
commit 6f04b4a5ec
2 changed files with 7 additions and 1 deletions

View File

@ -311,8 +311,10 @@ class Board:
if cfg.options.disable_ekf3:
env.CXXFLAGS += ['-DHAL_NAVEKF3_AVAILABLE=0']
if cfg.options.osd:
if cfg.options.osd or cfg.options.osd_fonts:
env.CXXFLAGS += ['-DOSD_ENABLED=1']
if cfg.options.osd_fonts:
for f in os.listdir('libraries/AP_OSD/fonts'):
if fnmatch.fnmatch(f, "font*bin"):
env.ROMFS_FILES += [(f,'libraries/AP_OSD/fonts/'+f)]

View File

@ -192,6 +192,10 @@ configuration in order to save typing.
default=False,
help="Enable OSD support")
g.add_option('--osd-fonts', action='store_true',
default=False,
help="Enable OSD support with fonts")
g.add_option('--sitl-osd', action='store_true',
default=False,
help="Enable SITL OSD")