From e99a0c66513ee1fdc58fcea1b020ab18c25464e9 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 25 Jun 2026 10:41:57 +1000 Subject: [PATCH] autotest: print beacon position delta as float, not truncated %u BeaconPosition() (also exercised by the Replay Beacon bit) waits for the EKF position to settle within max_delta=1 m of the pre-switch GPS fix and logs the distance with "delta=%u". pos_delta is a float in metres, so %u truncated it: a genuine 1.55 m miss printed as "delta=1", which reads as though it satisfied "want <= 1" yet the test still timed out -- actively misleading when diagnosing the beacon-convergence flake. Print %.2f. Co-Authored-By: Claude Opus 4.8 (1M context) --- Tools/autotest/arducopter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 6df4786e9626c..bc894461c8f1e 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -10198,7 +10198,7 @@ def BeaconPosition(self): new_pos = self.get_global_position_int() pos_delta = self.get_distance_int(old_pos, new_pos) max_delta = 1 - self.progress("delta=%u want <= %u" % (pos_delta, max_delta)) + self.progress(f"delta={pos_delta:.2f} want <= {max_delta}") if pos_delta <= max_delta: break