Skip to content

Commit

Permalink
autotest:add AUTOLAND mode test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwurzburg committed Dec 2, 2024
1 parent 669f305 commit 7703f85
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Tools/autotest/arduplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -4200,6 +4200,17 @@ def FlyEachFrame(self):
self.fly_mission(mission_file, strict=False, quadplane=quadplane, mission_timeout=400.0)
self.wait_disarmed()

def AutoLandMode(self):
'''Test AUTOLAND mode'''
self.customise_SITL_commandline(["--home", "-35.362938,149.165085,585,173"])
self.context_collect('STATUSTEXT')
self.takeoff(alt=80, mode='TAKEOFF')
self.wait_text("Takeoff initial direction", check_context=True)
self.change_mode(26)
self.wait_disarmed(120)
self.progress("Check the landed heading matches takeoff")
self.wait_heading(173, accuracy=5, timeout=1)

def RCDisableAirspeedUse(self):
'''Test RC DisableAirspeedUse option'''
self.set_parameter("RC9_OPTION", 106)
Expand Down Expand Up @@ -5847,6 +5858,8 @@ def DO_PARACHUTE(self):

def _MAV_CMD_DO_GO_AROUND(self, command):
self.load_mission("mission.txt")
self.context_collect('STATUSTEXT')
self.takeoff(mode='TAKEOFF')
self.set_parameter("RTL_AUTOLAND", 3)
self.change_mode('AUTO')
self.wait_ready_to_arm()
Expand Down Expand Up @@ -6404,6 +6417,7 @@ def tests1b(self):
self.MAV_CMD_DO_AUX_FUNCTION,
self.SmartBattery,
self.FlyEachFrame,
self.AutoLandMode,
self.RCDisableAirspeedUse,
self.AHRS_ORIENTATION,
self.AHRSTrim,
Expand Down

0 comments on commit 7703f85

Please sign in to comment.