diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 9cae93ec3a..686f7e0755 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -437,7 +437,10 @@ class linux(Board): if self.with_uavcan: cfg.define('UAVCAN_EXCEPTIONS', 0) - + + if cfg.options.apstatedir: + cfg.define('AP_STATEDIR', cfg.options.apstatedir) + def build(self, bld): super(linux, self).build(bld) if bld.options.upload: diff --git a/wscript b/wscript index 4325764221..4a27bcfbac 100644 --- a/wscript +++ b/wscript @@ -101,6 +101,13 @@ submodules at specific revisions. opt.parser.remove_option(k) g.add_option(option) + g.add_option('--apstatedir', + action='store', + default='', + help='''Where to save data like parameters, log and terrain. +This is the --localstatedir + ArduPilot's subdirectory [default: +board-dependent, usually /var/lib/ardupilot]''') + g.add_option('--rsync-dest', dest='rsync_dest', action='store',