mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 07:13:33 +08:00
param gen reorganize and fix DISABLE_PARAMS_MODULE_SCOPING
This commit is contained in:
@@ -77,10 +77,10 @@ def main():
|
||||
help="Inject additional param XML file"
|
||||
" (default FILENAME: ../Tools/parameters_injected.xml)")
|
||||
parser.add_argument("-b", "--board",
|
||||
nargs='?',
|
||||
const="",
|
||||
metavar="BOARD",
|
||||
help="Board to create xml parameter xml for")
|
||||
nargs='?',
|
||||
const="",
|
||||
metavar="BOARD",
|
||||
help="Board to create xml parameter xml for")
|
||||
parser.add_argument("-m", "--markdown",
|
||||
nargs='?',
|
||||
const="parameters.md",
|
||||
@@ -118,13 +118,14 @@ def main():
|
||||
metavar="SUMMARY",
|
||||
default="Automagically updated parameter documentation from code.",
|
||||
help="DokuWiki page edit summary")
|
||||
parser.add_argument('-v', '--verbose', action='store_true', help="verbose output")
|
||||
parser.add_argument('-v', '--verbose',
|
||||
action='store_true',
|
||||
help="verbose output")
|
||||
parser.add_argument("-o", "--overrides",
|
||||
default="{}",
|
||||
metavar="OVERRIDES",
|
||||
help="a dict of overrides in the form of a json string")
|
||||
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Check for valid command
|
||||
@@ -138,8 +139,9 @@ def main():
|
||||
parser = srcparser.SourceParser()
|
||||
|
||||
# Scan directories, and parse the files
|
||||
if (args.verbose): print("Scanning source path " + str(args.src_path))
|
||||
|
||||
if (args.verbose):
|
||||
print("Scanning source path " + str(args.src_path))
|
||||
|
||||
if not scanner.ScanDir(args.src_path, parser):
|
||||
sys.exit(1)
|
||||
|
||||
@@ -162,7 +164,8 @@ def main():
|
||||
|
||||
# Output to XML file
|
||||
if args.xml:
|
||||
if args.verbose: print("Creating XML file " + args.xml)
|
||||
if args.verbose:
|
||||
print("Creating XML file " + args.xml)
|
||||
cur_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
out = xmlout.XMLOutput(param_groups, args.board,
|
||||
os.path.join(cur_dir, args.inject_xml))
|
||||
|
||||
Reference in New Issue
Block a user