From e091e8ad3385aed108e18d3912df9030eecec3ad Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 16 Aug 2022 16:30:40 +1000 Subject: [PATCH] autotest: clear context before looking for GPS type Will clarify the output as currently we look through the text messages for all of the previous gps types when trying to find the detection message for the current GPS --- Tools/autotest/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 643d8550f1..bf5a7a2ab3 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -12187,13 +12187,14 @@ switch value''' (8, "NOVA", 15, "NOVA"), # no attempt to auto-detect this in AP_GPS # (9, "FILE"), ] + self.context_collect("STATUSTEXT") for (sim_gps_type, name, gps_type, detect_name) in sim_gps: self.start_subtest("Checking GPS type %s" % name) self.set_parameter("SIM_GPS_TYPE", sim_gps_type) if gps_type is None: gps_type = 1 # auto-detect self.set_parameter("GPS_TYPE", gps_type) - self.context_collect("STATUSTEXT") + self.context_clear_collection('STATUSTEXT') self.reboot_sitl() self.wait_statustext("detected as %s" % detect_name, check_context=True) n = self.poll_home_position(timeout=120)