From d3b3c443bc519bf526dd367271b94c74792ab0e5 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 13 Feb 2021 12:26:29 +1100 Subject: [PATCH] autotest: reset copter completely after autotune test --- Tools/autotest/arducopter.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index b0c44aa3fa..b14925cbcf 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -1894,6 +1894,13 @@ class AutoTestCopter(AutoTest): self.context_push() + # autotune changes a set of parameters on the vehicle which + # are not in our context. That changes the flight + # characterstics, which we can't afford between runs. So + # completely reset the simulated vehicle after the run is + # complete by "customising" the commandline here: + self.customise_SITL_commandline([]) + ex = None try: @@ -1903,7 +1910,6 @@ class AutoTestCopter(AutoTest): ex = e self.context_pop() - self.reboot_sitl() if ex is not None: raise ex