autotest: wait for heartbeat before determining armed state

Fixes a race condition when finishing a mission where we may receive the disarmed text but the most recent heartbeat says we are armed.
This commit is contained in:
Peter Barker 2022-09-19 09:41:24 +10:00 committed by Peter Barker
parent 0e9abea655
commit 267c16cd72

View File

@ -4465,6 +4465,7 @@ class AutoTest(ABC):
def armed(self):
"""Return true if vehicle is armed and safetyoff"""
self.wait_heartbeat()
return self.mav.motors_armed()
def send_mavlink_arm_command(self):