autotest: make fly_proximity_avoidance_test_alt_no_avoid more reliable

This commit is contained in:
Peter Barker 2021-02-21 09:39:34 +11:00 committed by Peter Barker
parent c913d8134d
commit b5f490aff4
1 changed files with 2 additions and 2 deletions

View File

@ -5031,9 +5031,8 @@ class AutoTestCopter(AutoTest):
while True:
if self.armed():
break
if self.get_sim_time() - tstart > 60:
if self.get_sim_time_cached() - tstart > 60:
raise AutoTestTimeoutException("Did not arm")
self.delay_sim_time(0.1)
self.mav.mav.distance_sensor_send(
0, # time_boot_ms
10, # min_distance cm
@ -5052,6 +5051,7 @@ class AutoTestCopter(AutoTest):
0,
0,
0)
self.wait_heartbeat()
self.takeoff(15, mode='LOITER')
self.progress("Poking vehicle; should avoid")
def shove(a, b):