From 38e324f1413e44c131e641ebd1dc1fd05290b3d9 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 6 Dec 2020 11:59:19 +1100 Subject: [PATCH] autotest: do not check prearm bit in dataflash-over-mavlink We won't be armable - but the other checks we make will ensure we get the error we are looking for Also use a more reliable way of draining the data from the autopilot --- Tools/autotest/common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 1d08840293..8c29a968cf 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -5773,7 +5773,7 @@ Also, ignores heartbeats not from our target system''' try: self.set_parameter("LOG_BACKEND_TYPE", 2) self.reboot_sitl() - self.wait_ready_to_arm() + self.wait_ready_to_arm(check_prearm_bit=False) self.mavproxy.send('arm throttle\n') self.mavproxy.expect('PreArm: Logging failed') self.mavproxy.send("module load dataflash_logger\n") @@ -5781,7 +5781,7 @@ Also, ignores heartbeats not from our target system''' self.mavproxy.expect('logging started') self.mavproxy.send("dataflash_logger set verbose 0\n") self.delay_sim_time(1) - self.drain_mav() # hopefully draining COMMAND_ACK from that failed arm + self.do_timesync_roundtrip() # drain COMMAND_ACK from that failed arm self.arm_vehicle() tstart = self.get_sim_time() last_status = 0 @@ -5800,8 +5800,9 @@ Also, ignores heartbeats not from our target system''' raise NotAchievedException("Exceptionally low transfer rate") self.disarm_vehicle() except Exception as e: + self.progress("Exception caught: %s" % + self.get_exception_stacktrace(e)) self.disarm_vehicle() - self.progress("Exception (%s) caught" % str(e)) ex = e self.context_pop() self.mavproxy.send("module unload dataflash_logger\n")