Skip to content

Commit

Permalink
autotest: improve debug on wait_gps_disable
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Dec 31, 2024
1 parent 6d7fcce commit 5726c03
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -8492,17 +8492,16 @@ def wait_gps_disable(self, position_horizontal=True, position_vertical=False, ti
self.progress("Waiting for EKF not having bits %u" % not_required_value)
last_print_time = 0
while timeout is None or self.get_sim_time_cached() < tstart + timeout:
m = self.mav.recv_match(type='EKF_STATUS_REPORT', blocking=True, timeout=timeout)
if m is None:
continue
current = m.flags
esr = self.assert_receive_message('EKF_STATUS_REPORT', timeout=timeout)
current = esr.flags
if self.get_sim_time_cached() - last_print_time > 1:
self.progress("Wait EKF.flags: not required:%u current:%u" %
(not_required_value, current))
last_print_time = self.get_sim_time_cached()
if current & not_required_value != not_required_value:
self.progress("GPS disable OK")
return
self.progress(f"Last EKF_STATUS_REPORT: {esr}")
raise AutoTestTimeoutException("Failed to get EKF.flags=%u disabled" % not_required_value)

def wait_text(self, *args, **kwargs):
Expand Down

0 comments on commit 5726c03

Please sign in to comment.