autotest: added --replay option to autotest
make for easy creation of EKF replay logs
This commit is contained in:
parent
2bd04c14fd
commit
618fa156c7
@ -510,6 +510,7 @@ def run_step(step):
|
||||
"frame": opts.frame,
|
||||
"_show_test_timings": opts.show_test_timings,
|
||||
"force_ahrs_type": opts.force_ahrs_type,
|
||||
"replay": opts.replay,
|
||||
"logs_dir": buildlogs_dirpath(),
|
||||
"sup_binaries": supplementary_binaries,
|
||||
}
|
||||
@ -975,6 +976,9 @@ if __name__ == "__main__":
|
||||
dest="force_ahrs_type",
|
||||
default=None,
|
||||
help="force a specific AHRS type (e.g. 10 for SITL-ekf")
|
||||
group_sim.add_option("", "--replay",
|
||||
action='store_true',
|
||||
help="enable replay logging for tests")
|
||||
parser.add_option_group(group_sim)
|
||||
|
||||
group_completion = optparse.OptionGroup(parser, "Completion helpers")
|
||||
|
@ -1209,6 +1209,7 @@ class AutoTest(ABC):
|
||||
_show_test_timings=False,
|
||||
logs_dir=None,
|
||||
force_ahrs_type=None,
|
||||
replay=False,
|
||||
sup_binaries=[]):
|
||||
|
||||
self.start_time = time.time()
|
||||
@ -1253,6 +1254,7 @@ class AutoTest(ABC):
|
||||
self.total_waiting_to_arm_time = 0
|
||||
self.waiting_to_arm_count = 0
|
||||
self.force_ahrs_type = force_ahrs_type
|
||||
self.replay = replay
|
||||
if self.force_ahrs_type is not None:
|
||||
self.force_ahrs_type = int(self.force_ahrs_type)
|
||||
self.logs_dir = logs_dir
|
||||
@ -2170,6 +2172,8 @@ class AutoTest(ABC):
|
||||
if self.force_ahrs_type == 3:
|
||||
ret["EK3_ENABLE"] = 1
|
||||
ret["AHRS_EKF_TYPE"] = self.force_ahrs_type
|
||||
if self.replay:
|
||||
ret["LOG_REPLAY"] = 1
|
||||
return ret
|
||||
|
||||
def apply_default_parameter_list(self):
|
||||
|
Loading…
Reference in New Issue
Block a user