From 71f8166818264534a0579cda8688c91c3b9707f1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 19 Nov 2012 11:56:46 +1100 Subject: [PATCH] autotest: fix a race condition with baro noise on startup we need to wait for a full GPS fix --- Tools/autotest/arduplane.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index 7f3292490c..2b4f33e0c7 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -289,8 +289,10 @@ def fly_ArduPlane(viewerip=None): print("Setting up RC parameters") setup_rc(mavproxy) print("Waiting for GPS fix") - mav.recv_match(condition='VFR_HUD.alt>0', blocking=True) + mav.recv_match(condition='VFR_HUD.alt>10', blocking=True) mav.wait_gps_fix() + while mav.location().alt < 10: + mav.wait_gps_fix() homeloc = mav.location() print("Home location: %s" % homeloc) if not takeoff(mavproxy, mav):