autotest: augment simulated GPS tests
This commit is contained in:
parent
d1c7ed1c82
commit
7446a28c45
@ -10770,19 +10770,26 @@ switch value'''
|
||||
'''check each simulated GPS works'''
|
||||
self.reboot_sitl()
|
||||
orig = self.poll_home_position(timeout=60)
|
||||
# (sim_gps_type, name, gps_type, detection name)
|
||||
# if gps_type is None we auto-detect
|
||||
sim_gps = [
|
||||
# (0, "NONE"),
|
||||
(1, "UBLOX"),
|
||||
# (5, "NMEA"), # broken
|
||||
(6, "SBP"),
|
||||
# (7, "SBP2"), # broken
|
||||
# (8, "NOVA"), # broken
|
||||
# (9, "FILE"),
|
||||
(1, "UBLOX", None, "u-blox"),
|
||||
(5, "NMEA", 5, "NMEA"),
|
||||
(6, "SBP", None, "SBP"),
|
||||
# (7, "SBP2", 9, "SBP2"), # broken, "waiting for config data"
|
||||
(8, "NOVA", 15, "NOVA"), # no attempt to auto-detect this in AP_GPS
|
||||
# (9, "FILE"),
|
||||
]
|
||||
for (sim_gps_type, name) in sim_gps:
|
||||
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.reboot_sitl()
|
||||
self.wait_statustext("detected as %s" % detect_name, check_context=True)
|
||||
n = self.poll_home_position(timeout=120)
|
||||
distance = self.get_distance_int(orig, n)
|
||||
if distance > 1:
|
||||
|
Loading…
Reference in New Issue
Block a user