mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
autotest: make nmea-output test more reliable
This commit is contained in:
parent
b6ef76a1ad
commit
280a44fc73
@ -3960,14 +3960,14 @@ switch value'''
|
|||||||
tstart = self.get_sim_time()
|
tstart = self.get_sim_time()
|
||||||
while True:
|
while True:
|
||||||
now = self.get_sim_time()
|
now = self.get_sim_time()
|
||||||
if now - tstart > 2:
|
if now - tstart > 20:
|
||||||
raise NotAchievedException("NMEA output not updating?!")
|
raise NotAchievedException("NMEA output not updating?!")
|
||||||
gps2 = self.mav.recv_match(type="GPS2_RAW", blocking=True, timeout=10)
|
gps2 = self.mav.recv_match(type="GPS2_RAW", blocking=True, timeout=1)
|
||||||
|
self.progress("gps2=%s" % str(gps2))
|
||||||
|
if gps2 is None:
|
||||||
|
continue
|
||||||
if gps2.time_usec != 0:
|
if gps2.time_usec != 0:
|
||||||
break
|
break
|
||||||
self.progress("gps2=(%s)" % str(gps2))
|
|
||||||
if gps2 is None:
|
|
||||||
raise NotAchievedException("Did not receive GPS2_RAW")
|
|
||||||
if self.get_distance_int(gps1, gps2) > 1:
|
if self.get_distance_int(gps1, gps2) > 1:
|
||||||
raise NotAchievedException("NMEA output inaccurate")
|
raise NotAchievedException("NMEA output inaccurate")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user