autotest: reset copter completely after autotune test

This commit is contained in:
Peter Barker 2021-02-13 12:26:29 +11:00 committed by Peter Barker
parent 9932aa99f7
commit d3b3c443bc
1 changed files with 7 additions and 1 deletions

View File

@ -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