diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 7f0039a39a..5131087ce9 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -52,11 +52,12 @@ class Board: ) # Setup scripting, had to defer this to allow checking board size - if ((not cfg.options.disable_scripting) and + if (cfg.options.enable_scripting or + ((not cfg.options.disable_scripting) and (not cfg.env.DISABLE_SCRIPTING) and ((cfg.env.BOARD_FLASH_SIZE is None) or (cfg.env.BOARD_FLASH_SIZE == []) or - (cfg.env.BOARD_FLASH_SIZE > 1024))): + (cfg.env.BOARD_FLASH_SIZE > 1024)))): env.DEFINES.update( AP_SCRIPTING_ENABLED = 1, diff --git a/wscript b/wscript index cfec66efb8..a8aa3e1f36 100644 --- a/wscript +++ b/wscript @@ -225,6 +225,10 @@ submodules at specific revisions. default=False, help="Disable onboard scripting engine") + g.add_option('--enable-scripting', action='store_true', + default=False, + help="Enable onboard scripting engine") + g.add_option('--no-gcs', action='store_true', default=False, help="Disable GCS code")