mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Tools: autotest: add parachute tests
Tools: autotest: add test for triggering parachute via mavlink Tools: autotest: add Copter mission test for parachute release Tools: autotest: add Plane test for parachute deployment in auto
This commit is contained in:
parent
ae03ccf2ba
commit
a1aefaff27
@ -1640,6 +1640,29 @@ class AutoTestCopter(AutoTest):
|
||||
self.set_parameter("SIM_PARA_ENABLE", 1)
|
||||
self.set_parameter("SIM_PARA_PIN", 9)
|
||||
|
||||
self.progress("Test triggering parachute in mission")
|
||||
self.load_mission("copter_parachute_mission.txt")
|
||||
self.change_mode('LOITER')
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
self.change_mode('AUTO')
|
||||
self.set_rc(3, 1600)
|
||||
self.mavproxy.expect('BANG')
|
||||
self.reboot_sitl()
|
||||
|
||||
self.progress("Test triggering with mavlink message")
|
||||
self.takeoff(20)
|
||||
self.run_cmd(mavutil.mavlink.MAV_CMD_DO_PARACHUTE,
|
||||
2, # release
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
self.mavproxy.expect('BANG')
|
||||
self.reboot_sitl()
|
||||
|
||||
self.progress("Testing three-position switch")
|
||||
self.set_parameter("RC9_OPTION", 23) # parachute 3pos
|
||||
|
||||
|
@ -700,6 +700,22 @@ class AutoTestPlane(AutoTest):
|
||||
if ex is not None:
|
||||
raise ex
|
||||
|
||||
def test_parachute(self):
|
||||
self.set_rc(9, 1000)
|
||||
self.set_parameter("CHUTE_ENABLED", 1)
|
||||
self.set_parameter("CHUTE_TYPE", 10)
|
||||
self.set_parameter("SERVO9_FUNCTION", 27)
|
||||
self.set_parameter("SIM_PARA_ENABLE", 1)
|
||||
self.set_parameter("SIM_PARA_PIN", 9)
|
||||
|
||||
self.load_mission("plane-parachute-mission.txt")
|
||||
self.mavproxy.send("wp set 1\n")
|
||||
self.change_mode('AUTO')
|
||||
self.wait_ready_to_arm()
|
||||
self.arm_vehicle()
|
||||
self.mavproxy.expect("BANG")
|
||||
self.reboot_sitl()
|
||||
|
||||
def run_subtest(self, desc, func):
|
||||
self.start_subtest(desc)
|
||||
func()
|
||||
@ -772,6 +788,8 @@ class AutoTestPlane(AutoTest):
|
||||
"Test Gripper mission items",
|
||||
self.test_gripper_mission),
|
||||
|
||||
("Parachute", "Test Parachute", self.test_parachute),
|
||||
|
||||
("LogDownLoad",
|
||||
"Log download",
|
||||
lambda: self.log_download(
|
||||
|
4
Tools/autotest/copter_parachute_mission.txt
Normal file
4
Tools/autotest/copter_parachute_mission.txt
Normal file
@ -0,0 +1,4 @@
|
||||
QGC WPL 110
|
||||
0 1 0 16 0.000000 0.000000 0.000000 0.000000 -35.362881 149.165222 582.000000 1
|
||||
1 0 3 22 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 20.000000 1
|
||||
2 0 0 208 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1
|
5
Tools/autotest/plane-parachute-mission.txt
Normal file
5
Tools/autotest/plane-parachute-mission.txt
Normal file
@ -0,0 +1,5 @@
|
||||
QGC WPL 110
|
||||
0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.362045 149.165878 584.280029 1
|
||||
1 0 3 22 0.000000 0.000000 0.000000 0.000000 -35.362125 149.165039 10.000000 1
|
||||
2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364845 149.163452 11.000000 1
|
||||
3 0 0 208 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1
|
Loading…
Reference in New Issue
Block a user