From 909401b15fdfb9ed8f484a5d715dd140579dca79 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 12 Sep 2023 15:43:53 +1000 Subject: [PATCH] autotest: loosen constrain on proximity distance message the floating/double changes appear to have cause this to start to flap --- Tools/autotest/arducopter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index c6555b08c1..f491d878fb 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -7137,6 +7137,7 @@ class AutoTestCopter(AutoTest): failed = False wants = [] gots = [] + epsilon = 20 while True: if self.get_sim_time_cached() - tstart > 30: raise AutoTestTimeoutException("Failed to get distances") @@ -7149,7 +7150,7 @@ class AutoTestCopter(AutoTest): want = expected_distances_copy[m.orientation] wants.append(want) gots.append(got) - if abs(want - got) > 5: + if abs(want - got) > epsilon: failed = True del expected_distances_copy[m.orientation] if failed: