From f19b831bc31e1815f2c7e5543e1c6575f22211ea Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 23 Mar 2019 15:30:34 +1100 Subject: [PATCH] Tools: autotest: add brake mode test --- Tools/autotest/arducopter.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index ce15b45947..5cde6aa456 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -2677,6 +2677,25 @@ class AutoTestCopter(AutoTest): (tdelta, max_good_tdelta)) self.progress("Vehicle returned") + def fly_brake_mode(self): + # test brake mode + self.progress("Testing brake mode") + self.takeoff(10, mode="LOITER") + + self.progress("Ensuring RC inputs have no effect in brake mode") + self.change_mode("STABILIZE") + self.set_rc(3, 1500) + self.set_rc(2, 1200) + self.wait_groundspeed(5, 1000) + + self.change_mode("BRAKE") + self.wait_groundspeed(0, 1) + + self.set_rc(2, 1500) + + self.do_RTL() + self.progress("Ran brake mode") + def fly_precision_companion(self): """Use Companion PrecLand backend precision messages to loiter.""" @@ -2839,6 +2858,8 @@ class AutoTestCopter(AutoTest): ("ThrowMode", "Fly Throw Mode", self.fly_throw_mode), + ("BrakeMode", "Fly Brake Mode", self.fly_brake_mode), + ("RecordThenPlayMission", "Use switches to toggle in mission, then fly it", self.fly_square),