From 36cc266626862f46ed950aaa299acaec927e17be Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Oct 2013 10:18:40 +1100 Subject: [PATCH] autotest: fixed wait_pitch() --- Tools/autotest/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 3a3919c9cc..99f9776508 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -105,7 +105,7 @@ def wait_pitch(mav, pitch, accuracy, timeout=30): p = math.degrees(m.pitch) r = math.degrees(m.roll) print("Pitch %d Roll %d" % (p, r)) - if math.fabs(r - pitch) <= accuracy: + if math.fabs(p - pitch) <= accuracy: print("Attained pitch %d" % pitch) return True print("Failed to attain pitch %d" % pitch)