autotest: added test of BRD_SD_MISSION

check that we can create and compare 4368 WPs
This commit is contained in:
Andrew Tridgell 2023-02-15 12:11:32 +11:00 committed by Peter Barker
parent c00e047d87
commit 1530dbde3d
1 changed files with 49 additions and 0 deletions

View File

@ -4156,6 +4156,54 @@ class AutoTestPlane(AutoTest):
else:
raise NotAchievedException("Missing trick %s" % t)
def SDCardWPTest(self):
'''test BRD_SD_MISSION support'''
spiral_script = "mission_spiral.lua"
self.context_push()
self.install_example_script(spiral_script)
self.context_collect('STATUSTEXT')
self.set_parameters({
"BRD_SD_MISSION" : 64,
"SCR_ENABLE" : 1,
"SCR_VM_I_COUNT" : 1000000
})
self.wait_ready_to_arm()
self.reboot_sitl()
self.wait_text("Loaded spiral mission creator", check_context=True)
self.set_parameters({
"SCR_USER2": 19, # radius
"SCR_USER3": -35.36322, # lat
"SCR_USER4": 149.16525, # lon
"SCR_USER5": 684.13, # alt
})
count = (65536 // 15) - 1
self.progress("Creating spiral mission of size %s" % count)
self.set_parameter("SCR_USER1", count)
self.wait_text("Created spiral of size %u" % count)
self.progress("Checking spiral before reboot")
self.set_parameter("SCR_USER6", count)
self.wait_text("Compared spiral of size %u OK" % count)
self.set_parameter("SCR_USER6", 0)
self.wait_ready_to_arm()
self.reboot_sitl()
self.progress("Checking spiral after reboot")
self.set_parameter("SCR_USER6", count)
self.wait_text("Compared spiral of size %u OK" % count)
self.remove_installed_script(spiral_script)
self.context_pop()
self.wait_ready_to_arm()
self.reboot_sitl()
def MANUAL_CONTROL(self):
'''test MANUAL_CONTROL mavlink message'''
self.set_parameter("SYSID_MYGCS", self.mav.source_system)
@ -4522,6 +4570,7 @@ class AutoTestPlane(AutoTest):
self.AirspeedCal,
self.MissionJumpTags,
self.GCSFailsafe,
self.SDCardWPTest,
])
return ret