autotest: do timesync roundtrip to ensure fresh system time

validating stream rates by checking we have received SYSTEM_TIME is no good if we receive data out of a tcp queue somewhere.
This commit is contained in:
Peter Barker 2023-05-29 13:00:16 +10:00 committed by Peter Barker
parent 909068e1e5
commit ddcf212c58
1 changed files with 1 additions and 0 deletions

View File

@ -2059,6 +2059,7 @@ class AutoTest(ABC):
def set_streamrate(self, streamrate, timeout=20, stream=mavutil.mavlink.MAV_DATA_STREAM_ALL):
'''set MAV_DATA_STREAM_ALL; timeout is wallclock time'''
self.do_timesync_roundtrip(timeout_in_wallclock=True)
tstart = time.time()
while True:
if time.time() - tstart > timeout: