Tools: autotest: add timeout for problematic spline test

This commit is contained in:
Peter Barker 2019-04-26 15:10:11 +10:00 committed by Peter Barker
parent fb1c2cef24
commit 68769e24c1
1 changed files with 8 additions and 1 deletions

View File

@ -3460,7 +3460,14 @@ class AutoTestHeli(AutoTestCopter):
self.wait_seconds(20)
self.change_mode("AUTO")
self.set_rc(3, 1500)
self.mav.motors_disarmed_wait()
tstart = self.get_sim_time()
while True:
if not self.armed():
break
remaining = self.get_sim_time() - tstart
if remaining <= 0:
raise AutoTestTimeoutException("Vehicle did not disarm after mission")
self.delay_sim_time(1)
self.progress("Lowering rotor speed")
self.set_rc(8, 1000)