From 3fac5ad52c9ada4e6ac61c6961bbeeeb6984dea6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 1 Mar 2020 15:53:01 +1100 Subject: [PATCH] autotest: loosen gyro fft test to avoid spurious CI failures --- Tools/autotest/arducopter.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index c216ead883..54991d670b 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -3803,7 +3803,13 @@ class AutoTestCopter(AutoTest): psd = self.mavfft_fttd(1, 0, tstart * 1.0e6, tend * 1.0e6) freq = psd["F"][numpy.argmax(psd["X"][ignore_bins:]) + ignore_bins] dblevel = numpy.amax(psd["X"][ignore_bins:]) - if dblevel < -10: + ''' +AUTOTEST: FAILED: "GyroFFT (Fly Gyro FFT)": NotAchievedException('Detected 178.703498Hz motor peak at -9.713545dB',) (see /home/travis/build/ArduPilot/buildlogs/ArduCopter-GyroFFT.txt) +That's pretty close to the -10 threshold; do we need to loosen the threshold? +Andy, 08:28 +yeah, if you are seeing test failures it would make sense. The harmonic matching logic is not great right now and I am working on improvements. +''' + if dblevel < -9: self.progress("Did not detect a motor peak, found %fHz at %fdB" % (freq, dblevel)) else: raise NotAchievedException("Detected %fHz motor peak at %fdB" % (freq, dblevel))