mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-06 16:49:51 +08:00
px_process_params.py: fix for empty cmake scope
Hotfix for cmake configs which use include() for the module list (eg. posix_sitl_ekf2.cmake or snapdragon). In that case the cmake parser did not find any modules and thus the param list was empty. The proper fix will be to parse the include() statements correctly.
This commit is contained in:
@@ -142,16 +142,19 @@ def main():
|
||||
except:
|
||||
use_scope = False
|
||||
pass
|
||||
if use_scope:
|
||||
if use_scope and len(cmake_scope.scope) > 0:
|
||||
if not scanner.ScanDir([os.path.join(args.src_path, p) for p in cmake_scope.scope], parser):
|
||||
sys.exit(1)
|
||||
else:
|
||||
else:
|
||||
if not scanner.ScanDir([args.src_path], parser):
|
||||
sys.exit(1)
|
||||
if not parser.Validate():
|
||||
sys.exit(1)
|
||||
param_groups = parser.GetParamGroups()
|
||||
|
||||
if len(param_groups) == 0:
|
||||
print("Warning: no parameters found")
|
||||
|
||||
# Output to XML file
|
||||
if args.xml:
|
||||
if args.verbose: print("Creating XML file " + args.xml)
|
||||
|
||||
Reference in New Issue
Block a user