Skip to content

Commit

Permalink
autotest: add test for ahrs-source.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Sep 8, 2024
1 parent 253d98d commit 1e8e250
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11840,6 +11840,26 @@ def MAV_CMD_MISSION_START_p1_p2(self):
want_result=mavutil.mavlink.MAV_RESULT_DENIED,
)

def ScriptingAHRSSource(self):
'''test ahrs-source.lua script'''
self.install_example_script_context("ahrs-source.lua")
self.set_parameters({
"RC10_OPTION": 90,
"SCR_ENABLE": 1,
"SCR_USER1": 10, # something else
"SCR_USER2": 10, # GPS something
"SCR_USER3": 0.2, # ExtNav innovation
})
self.set_rc(10, 2000)
self.reboot_sitl()
self.context_collect('STATUSTEXT')
self.set_rc(10, 1000)
self.wait_statustext('Using EKF Source Set 1', check_context=True)
self.set_rc(10, 1500)
self.wait_statustext('Using EKF Source Set 2', check_context=True)
self.set_rc(10, 2000)
self.wait_statustext('Using EKF Source Set 3', check_context=True)

def tests2b(self): # this block currently around 9.5mins here
'''return list of all tests'''
ret = ([
Expand Down Expand Up @@ -11941,6 +11961,7 @@ def tests2b(self): # this block currently around 9.5mins here
self.MissionRTLYawBehaviour,
self.BatteryInternalUseOnly,
self.MAV_CMD_MISSION_START_p1_p2,
self.ScriptingAHRSSource,
])
return ret

Expand Down

0 comments on commit 1e8e250

Please sign in to comment.