Tools: don't put lua parameters in rst output
This commit is contained in:
parent
04c6fc6ea3
commit
62b7d0276e
@ -16,11 +16,12 @@ class Vehicle(object):
|
|||||||
|
|
||||||
|
|
||||||
class Library(object):
|
class Library(object):
|
||||||
def __init__(self, name, reference=None):
|
def __init__(self, name, reference=None, not_rst=False):
|
||||||
self.set_name(name)
|
self.set_name(name)
|
||||||
self.params = []
|
self.params = []
|
||||||
if reference is not None:
|
if reference is not None:
|
||||||
self.reference = reference
|
self.reference = reference
|
||||||
|
self.not_rst = not_rst
|
||||||
|
|
||||||
def set_name(self, name):
|
def set_name(self, name):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
@ -81,15 +81,17 @@ def find_vehicle_parameter_filepath(vehicle_name):
|
|||||||
|
|
||||||
raise ValueError("Unable to find parameters file for (%s)" % vehicle_name)
|
raise ValueError("Unable to find parameters file for (%s)" % vehicle_name)
|
||||||
|
|
||||||
|
|
||||||
def debug(str_to_print):
|
def debug(str_to_print):
|
||||||
"""Debug output if verbose is set."""
|
"""Debug output if verbose is set."""
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
print(str_to_print)
|
print(str_to_print)
|
||||||
|
|
||||||
|
|
||||||
def lua_applets():
|
def lua_applets():
|
||||||
'''return list of Library objects for lua applets and drivers'''
|
'''return list of Library objects for lua applets and drivers'''
|
||||||
lua_lib = Library("", reference="Lua Script")
|
lua_lib = Library("", reference="Lua Script", not_rst=True)
|
||||||
patterns=["libraries/AP_Scripting/applets/*.lua", "libraries/AP_Scripting/drivers/*.lua"]
|
patterns = ["libraries/AP_Scripting/applets/*.lua", "libraries/AP_Scripting/drivers/*.lua"]
|
||||||
paths = []
|
paths = []
|
||||||
for p in patterns:
|
for p in patterns:
|
||||||
debug("Adding lua paths %s" % p)
|
debug("Adding lua paths %s" % p)
|
||||||
@ -620,6 +622,8 @@ for emitter_name in emitters_to_use:
|
|||||||
# rename, and on the assumption that an asciibetical sort
|
# rename, and on the assumption that an asciibetical sort
|
||||||
# gives a good layout:
|
# gives a good layout:
|
||||||
if emitter_name == 'rst':
|
if emitter_name == 'rst':
|
||||||
|
if library.not_rst:
|
||||||
|
continue
|
||||||
if library.name == 'SIM_':
|
if library.name == 'SIM_':
|
||||||
library = copy.deepcopy(library)
|
library = copy.deepcopy(library)
|
||||||
library.params = sim_params
|
library.params = sim_params
|
||||||
|
Loading…
Reference in New Issue
Block a user