From f89bfff0373228231e3c10cf284fac8d76cda358 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 12 Mar 2024 09:32:33 +1100 Subject: [PATCH] autotest: ensure latest log is timestamped, small and not growing A fixed time this log is open for ensures we know what we are downloading. We will not be keeping dataflash logs of the rest of this test after this PR as we leave LOG_DISARMED as it is. Waiting for GPS ensures the file gets a timestamp, so MAVProxy's "log download latest" will return that log file. --- Tools/autotest/vehicle_test_suite.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/vehicle_test_suite.py b/Tools/autotest/vehicle_test_suite.py index 7fb44e0861..772bf92075 100644 --- a/Tools/autotest/vehicle_test_suite.py +++ b/Tools/autotest/vehicle_test_suite.py @@ -4372,7 +4372,7 @@ class TestSuite(ABC): self.context_push() self.set_parameters({ "NET_ENABLED": 1, - "LOG_DISARMED": 1, + "LOG_DISARMED": 0, "LOG_DARM_RATEMAX": 1, # make small logs # UDP client "NET_P1_TYPE": 1, @@ -4409,6 +4409,17 @@ class TestSuite(ABC): }) self.reboot_sitl() + # ensure the latest log file is very small: + self.context_push() + self.set_parameter('LOG_DISARMED', 1) + self.delay_sim_time(15) + self.progress(f"Current onboard log filepath {self.current_onboard_log_filepath()}") + self.context_pop() + + # ensure that the autopilot has a timestamp on that file by + # now, or MAVProxy does not see it as the latest log: + self.wait_gps_fix_type_gte(3) + self.set_parameter('SIM_SPEEDUP', 1) endpoints = [('UDPClient', ':16001') ,