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):
|
def vehicleinfo_key(self):
|
||||||
return self.log_name()
|
return self.log_name()
|
||||||
|
|
||||||
def repeatedly_apply_parameter_file(self, filepath):
|
def repeatedly_apply_parameter_filepath(self, filepath):
|
||||||
if False:
|
if False:
|
||||||
return self.repeatedly_apply_parameter_file_mavproxy(filepath)
|
return self.repeatedly_apply_parameter_filepath_mavproxy(filepath)
|
||||||
parameters = mavparm.MAVParmDict()
|
parameters = mavparm.MAVParmDict()
|
||||||
# correct_parameters = set()
|
# correct_parameters = set()
|
||||||
if not parameters.load(filepath):
|
if not parameters.load(filepath):
|
||||||
|
@ -2073,7 +2073,7 @@ class TestSuite(ABC):
|
||||||
param_dict[p] = parameters[p]
|
param_dict[p] = parameters[p]
|
||||||
self.set_parameters(param_dict)
|
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'''
|
'''keep applying a parameter file until no parameters changed'''
|
||||||
for i in range(0, 3):
|
for i in range(0, 3):
|
||||||
self.mavproxy.send("param load %s\n" % filepath)
|
self.mavproxy.send("param load %s\n" % filepath)
|
||||||
|
@ -2094,7 +2094,7 @@ class TestSuite(ABC):
|
||||||
if self.params is None:
|
if self.params is None:
|
||||||
self.params = self.model_defaults_filepath(self.frame)
|
self.params = self.model_defaults_filepath(self.frame)
|
||||||
for x in self.params:
|
for x in self.params:
|
||||||
self.repeatedly_apply_parameter_file(x)
|
self.repeatedly_apply_parameter_filepath(x)
|
||||||
|
|
||||||
def count_lines_in_filepath(self, filepath):
|
def count_lines_in_filepath(self, filepath):
|
||||||
return len([i for i in open(filepath)])
|
return len([i for i in open(filepath)])
|
||||||
|
@ -14809,7 +14809,7 @@ SERIAL5_BAUD 128
|
||||||
def load_default_params_file(self, filename):
|
def load_default_params_file(self, filename):
|
||||||
'''load a file from Tools/autotest/default_params'''
|
'''load a file from Tools/autotest/default_params'''
|
||||||
filepath = util.reltopdir(os.path.join("Tools", "autotest", "default_params", filename))
|
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):
|
def send_pause_command(self):
|
||||||
'''pause AUTO/GUIDED modes'''
|
'''pause AUTO/GUIDED modes'''
|
||||||
|
|
Loading…
Reference in New Issue