Tools: autotest: test that long fs triggers even if short fs disabled

This commit is contained in:
Peter Barker 2019-08-15 09:51:23 +10:00 committed by Peter Barker
parent e70ff1b30a
commit a8a5ccf51b
2 changed files with 19 additions and 1 deletions

View File

@ -879,6 +879,21 @@ class AutoTestPlane(AutoTest):
raise NotAchievedException("Receiver not healthy")
self.change_mode('MANUAL')
self.progress("Ensure long failsafe can trigger when short failsafe disabled")
self.context_push()
ex = None
try:
self.set_parameter("FS_SHORT_ACTN", 3) # 3 means disabled
self.set_parameter("SIM_RC_FAIL", 1)
self.wait_statustext("Long event on")
except Exception as e:
self.progress("Exception caught:")
self.progress(self.get_exception_stacktrace(e))
ex = e
self.context_pop()
if ex is not None:
raise ex
def test_gripper_mission(self):
self.context_push()
ex = None

View File

@ -1909,7 +1909,10 @@ class AutoTest(ABC):
return
raise AutoTestTimeoutException("Failed to get EKF.flags=%u disabled" % not_required_value)
def wait_text(self, text, timeout=20, the_function=None):
def wait_text(self, *args, **kwargs):
self.wait_statustext(*args, **kwargs)
def wait_statustext(self, text, timeout=20, the_function=None):
"""Wait a specific STATUS_TEXT."""
self.progress("Waiting for text : %s" % text.lower())
tstart = self.get_sim_time()