From bdb84ed24457192341b998a23d52055cb0eaa292 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 23 May 2024 22:21:08 +1000 Subject: [PATCH] autotest: add test for Guided WeatherVane behaviour --- Tools/autotest/arducopter.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 6bd736a1db..fd9b8fa666 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -11414,6 +11414,20 @@ class AutoTestCopter(vehicle_test_suite.TestSuite): self.context_pop() self.reboot_sitl(force=True) + def GuidedWeatherVane(self): + '''check Copter Guided mode weathervane option''' + self.set_parameters({ + 'SIM_WIND_SPD': 10, + 'SIM_WIND_DIR': 90, + 'WVANE_ENABLE': 1, + }) + self.takeoff(20, mode='GUIDED') + self.guided_achieve_heading(0) + + self.set_parameter("GUID_OPTIONS", 128) + self.wait_heading(90, timeout=60, minimum_duration=10) + self.do_RTL() + def tests2b(self): # this block currently around 9.5mins here '''return list of all tests''' ret = ([ @@ -11502,6 +11516,7 @@ class AutoTestCopter(vehicle_test_suite.TestSuite): self.EK3_OGN_HGT_MASK, self.FarOrigin, self.GuidedForceArm, + self.GuidedWeatherVane ]) return ret