Tools: unhide groups when generating parameters in autotest

This commit is contained in:
Peter Barker 2016-10-26 08:32:28 +11:00 committed by Andrew Tridgell
parent 2bd13af43d
commit 30233ab9b8
2 changed files with 4 additions and 2 deletions

View File

@ -38,7 +38,7 @@ def get_default_params(atype, binary):
frame = "+"
home = "%f,%f,%u,%u" % (HOME.lat, HOME.lng, HOME.alt, HOME.heading)
sitl = util.start_SITL(binary, wipe=True, model=frame, home=home, speedup=10)
sitl = util.start_SITL(binary, wipe=True, model=frame, home=home, speedup=10, unhide_parameters=True)
mavproxy = util.start_MAVProxy_SITL(atype)
print("Dumping defaults")
idx = mavproxy.expect(['Please Run Setup', 'Saved [0-9]+ parameters to (\S+)'])

View File

@ -180,7 +180,7 @@ def make_safe_filename(text):
class SITL(pexpect.spawn):
def __init__(self, binary, valgrind=False, gdb=False, wipe=False, synthetic_clock=True, home=None, model=None, speedup=1, defaults_file=None):
def __init__(self, binary, valgrind=False, gdb=False, wipe=False, synthetic_clock=True, home=None, model=None, speedup=1, defaults_file=None, unhide_parameters=False):
self.binary = binary
self.model = model
@ -206,6 +206,8 @@ class SITL(pexpect.spawn):
cmd.extend(['--speedup', str(speedup)])
if defaults_file is not None:
cmd.extend(['--defaults', defaults_file])
if unhide_parameters:
cmd.extend(['--unhide-groups'])
print("Running: %s" % cmd_as_shell(cmd))
first = cmd[0]
rest = cmd[1:]