autotest: add test for mount-poi.lua

This commit is contained in:
Peter Barker 2023-02-15 19:00:39 +11:00 committed by Peter Barker
parent d6b5dc206e
commit 19ccf08412

View File

@ -9577,6 +9577,29 @@ class AutoTestCopter(AutoTest):
])
return ret
def ScriptMountPOI(self):
'''test the MountPOI example script'''
self.context_push()
self.install_terrain_handlers_context()
self.set_parameters({
"SCR_ENABLE": 1,
"RC12_OPTION": 300,
})
self.setup_servo_mount()
self.reboot_sitl()
self.set_rc(6, 1300)
self.install_example_script_context('mount-poi.lua')
self.reboot_sitl()
self.wait_ready_to_arm()
self.context_collect('STATUSTEXT')
self.set_rc(12, 2000)
self.wait_statustext('POI.*-35.*149', check_context=True, regex=True)
self.set_rc(12, 1000)
self.context_pop()
self.reboot_sitl()
def tests2b(self): # this block currently around 9.5mins here
'''return list of all tests'''
ret = ([
@ -9627,6 +9650,7 @@ class AutoTestCopter(AutoTest):
self.EK3_RNG_USE_HGT,
self.TerrainDBPreArm,
self.ThrottleGainBoost,
self.ScriptMountPOI,
])
return ret