From c5189feeeebdd212e9d58ff8f5ac304be8dae56c Mon Sep 17 00:00:00 2001 From: Henry Wurzburg Date: Wed, 1 Jan 2025 17:25:12 -0600 Subject: [PATCH] Tools: mode AUTOLAND enhancements --- Tools/autotest/arduplane.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index cf94ae2c875c0..e0600d91ec8fe 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -4241,17 +4241,28 @@ def FlyEachFrame(self): def AutoLandMode(self): '''Test AUTOLAND mode''' + self.set_parameters({ + "AUTOLAND_DIR_OFF": 45, + }) self.customise_SITL_commandline(["--home", "-35.362938,149.165085,585,173"]) self.context_collect('STATUSTEXT') self.takeoff(alt=80, mode='TAKEOFF') self.wait_text("Autoland 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) - loc = mavutil.location(-35.362938, 149.165085, 585, 173) + self.progress("Check the landed heading matches takeoff plus offset") + self.wait_heading(218, accuracy=5, timeout=1) + loc = mavutil.location(-35.362938, 149.165085, 585, 218) if self.get_distance(loc, self.mav.location()) > 35: raise NotAchievedException("Did not land close to home") + self.set_parameters({ + "TKOFF_OPTIONS": 2, + }) + self.wait_ready_to_arm() + self.set_autodisarm_delay(0) + self.arm_vehicle() + self.progress("Check the set dir on arm option") + self.wait_text("Autoland direction", check_context=True) def RCDisableAirspeedUse(self): '''Test RC DisableAirspeedUse option'''