From 6442dd1f2fe416d9e75c7f6fcdf532f12f8aa04b Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 28 Jun 2019 18:51:24 +1000 Subject: [PATCH] Tools: autotest: make vision position test more reliable --- Tools/autotest/arducopter.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index b50ab56254..73197e7fca 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -1442,20 +1442,20 @@ class AutoTestCopter(AutoTest): # without a GPS or some sort of external prompting, AP # doesn't send system_time messages. So prompt it: self.mav.mav.system_time_send(int(time.time() * 1000000), 0) - self.mav.mav.set_gps_global_origin_send(1, - old_pos.lat, - old_pos.lon, - old_pos.alt) self.progress("Waiting for non-zero-lat") tstart = self.get_sim_time() while True: + self.mav.mav.set_gps_global_origin_send(1, + old_pos.lat, + old_pos.lon, + old_pos.alt) gpi = self.mav.recv_match(type='GLOBAL_POSITION_INT', blocking=True) - # self.progress("gpi=%s" % str(gpi)) + self.progress("gpi=%s" % str(gpi)) if gpi.lat != 0: break - if self.get_sim_time_cached() - tstart > 20: + if self.get_sim_time_cached() - tstart > 60: raise AutoTestTimeoutException("Did not get non-zero lat") self.takeoff()