mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
param_parse.py: emit rst heading only for SIM_, no children
This commit is contained in:
parent
8de890bc7d
commit
bd850b9034
@ -28,6 +28,7 @@ This list is automatically generated from the latest ardupilot source code, and
|
|||||||
self.f = open(self.output_fname(), mode='w')
|
self.f = open(self.output_fname(), mode='w')
|
||||||
self.spacer = re.compile("^", re.MULTILINE)
|
self.spacer = re.compile("^", re.MULTILINE)
|
||||||
self.rstescape = re.compile("([^a-zA-Z0-9\n ])")
|
self.rstescape = re.compile("([^a-zA-Z0-9\n ])")
|
||||||
|
self.emitted_sitl_heading = False
|
||||||
parameterlisttype = "Complete Parameter List"
|
parameterlisttype = "Complete Parameter List"
|
||||||
parameterlisttype += "\n" + "=" * len(parameterlisttype)
|
parameterlisttype += "\n" + "=" * len(parameterlisttype)
|
||||||
self.preamble = """.. Dynamically generated list of documented parameters
|
self.preamble = """.. Dynamically generated list of documented parameters
|
||||||
@ -191,8 +192,17 @@ This list is automatically generated from the latest ardupilot source code, and
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
def emit(self, g):
|
def emit(self, g):
|
||||||
tag = '%s Parameters' % self.escape(g.reference)
|
# make only a single group for SIM_ parameters
|
||||||
reference = "parameters_" + g.reference
|
do_emit_heading = True
|
||||||
|
if g.reference.startswith("SIM_"):
|
||||||
|
if self.emitted_sitl_heading:
|
||||||
|
do_emit_heading = False
|
||||||
|
self.emitted_sitl_heading = True
|
||||||
|
tag = "Simulation Parameters"
|
||||||
|
reference = "parameters_sim"
|
||||||
|
else:
|
||||||
|
tag = '%s Parameters' % self.escape(g.reference)
|
||||||
|
reference = "parameters_" + g.reference
|
||||||
|
|
||||||
field_table_info = {
|
field_table_info = {
|
||||||
"Values": {
|
"Values": {
|
||||||
@ -203,7 +213,9 @@ This list is automatically generated from the latest ardupilot source code, and
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = """
|
ret = ""
|
||||||
|
if do_emit_heading:
|
||||||
|
ret = """
|
||||||
|
|
||||||
.. _{reference}:
|
.. _{reference}:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user