mirror of https://github.com/ArduPilot/ardupilot
autotest: rename load-parameters method to be more accurate
This commit is contained in:
parent
e75903d6fa
commit
33bae74d07
|
@ -2061,9 +2061,9 @@ class TestSuite(ABC):
|
|||
def vehicleinfo_key(self):
|
||||
return self.log_name()
|
||||
|
||||
def repeatedly_apply_parameter_file(self, filepath):
|
||||
def repeatedly_apply_parameter_filepath(self, filepath):
|
||||
if False:
|
||||
return self.repeatedly_apply_parameter_file_mavproxy(filepath)
|
||||
return self.repeatedly_apply_parameter_filepath_mavproxy(filepath)
|
||||
parameters = mavparm.MAVParmDict()
|
||||
# correct_parameters = set()
|
||||
if not parameters.load(filepath):
|
||||
|
@ -2073,7 +2073,7 @@ class TestSuite(ABC):
|
|||
param_dict[p] = parameters[p]
|
||||
self.set_parameters(param_dict)
|
||||
|
||||
def repeatedly_apply_parameter_file_mavproxy(self, filepath):
|
||||
def repeatedly_apply_parameter_filepath_mavproxy(self, filepath):
|
||||
'''keep applying a parameter file until no parameters changed'''
|
||||
for i in range(0, 3):
|
||||
self.mavproxy.send("param load %s\n" % filepath)
|
||||
|
@ -2094,7 +2094,7 @@ class TestSuite(ABC):
|
|||
if self.params is None:
|
||||
self.params = self.model_defaults_filepath(self.frame)
|
||||
for x in self.params:
|
||||
self.repeatedly_apply_parameter_file(x)
|
||||
self.repeatedly_apply_parameter_filepath(x)
|
||||
|
||||
def count_lines_in_filepath(self, filepath):
|
||||
return len([i for i in open(filepath)])
|
||||
|
@ -14809,7 +14809,7 @@ SERIAL5_BAUD 128
|
|||
def load_default_params_file(self, filename):
|
||||
'''load a file from Tools/autotest/default_params'''
|
||||
filepath = util.reltopdir(os.path.join("Tools", "autotest", "default_params", filename))
|
||||
self.repeatedly_apply_parameter_file(filepath)
|
||||
self.repeatedly_apply_parameter_filepath(filepath)
|
||||
|
||||
def send_pause_command(self):
|
||||
'''pause AUTO/GUIDED modes'''
|
||||
|
|
Loading…
Reference in New Issue