From 84adb059ed9e3f8a8ca2e2d657acc7e82b7d426f Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 18 Jul 2022 17:02:49 +1000 Subject: [PATCH] autotest: correct frsky text comparison bug reusing the variable "text" here crewed up subsequent receiving of messages as it could reset the text from empty to the most recently received text. --- Tools/autotest/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 624251aaf0..49a2f465f1 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -11087,12 +11087,12 @@ switch value''' last_len_received_statustexts = len(received_statustexts) self.progress("received statustexts: %s" % str([x.text for x in received_statustexts])) self.progress("received frsky texts: %s" % str(received_frsky_texts)) - for (want_sev, text) in received_frsky_texts: + for (want_sev, received_text) in received_frsky_texts: for m in received_statustexts: - if m.text == text: + if m.text == received_text: if want_sev != m.severity: raise NotAchievedException("Incorrect severity; want=%u got=%u" % (want_sev, severity)) - self.progress("Got statustext (%s)" % text) + self.progress("Got statustext (%s)" % received_text) break self.context_stop_collecting('STATUSTEXT')