autotest: reboot SITL after running autotune switch test

This commit is contained in:
Peter Barker 2020-07-23 20:37:12 +10:00 committed by Peter Barker
parent 760e86ff4d
commit 39f16c4679
1 changed files with 18 additions and 0 deletions

View File

@ -1716,6 +1716,24 @@ class AutoTestCopter(AutoTest):
def fly_autotune_switch(self):
"""Test autotune on a switch with gains being saved"""
self.context_push()
ex = None
try:
self.fly_autotune_switch_body()
except Exception as e:
self.progress("Exception caught: %s" % (
self.get_exception_stacktrace(e)))
ex = e
self.context_pop()
self.reboot_sitl()
if ex is not None:
raise ex
def fly_autotune_switch_body(self):
self.set_parameter("RC8_OPTION", 17)
self.set_parameter("ATC_RAT_RLL_FLTT", 20)
rlld = self.get_parameter("ATC_RAT_RLL_D")