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.
This commit is contained in:
Peter Barker 2024-03-12 09:32:33 +11:00 committed by Peter Barker
parent 8ab3b0db37
commit f89bfff037
1 changed files with 12 additions and 1 deletions

View File

@ -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') ,