Browse Source

autotest: add test for auxilliary functions in missions

zr-v5.1
Peter Barker 4 years ago committed by Peter Barker
parent
commit
b2f47ba367
  1. 6
      Tools/autotest/ArduCopter_Tests/AuxFunctionsInMission/aux_functions.txt
  2. 15
      Tools/autotest/arducopter.py

6
Tools/autotest/ArduCopter_Tests/AuxFunctionsInMission/aux_functions.txt

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
QGC WPL 110
0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 584.109985 1
1 0 3 22 0.000000 0.000000 0.000000 0.000000 -35.362790 149.165127 10.000000 1
2 0 0 218 70.000000 2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1
3 0 0 93 20.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1
4 0 0 20 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1

15
Tools/autotest/arducopter.py

@ -5738,6 +5738,17 @@ class AutoTestCopter(AutoTest): @@ -5738,6 +5738,17 @@ class AutoTestCopter(AutoTest):
self.wait_current_waypoint(0, timeout=10)
self.set_rc(7, 1000)
def test_aux_functions_in_mission(self):
self.load_mission("aux_functions.txt")
self.change_mode('LOITER')
self.wait_ready_to_arm()
self.arm_vehicle()
self.change_mode('AUTO')
self.set_rc(3, 1500)
self.wait_mode('ALT_HOLD')
self.change_mode('AUTO')
self.wait_rtl_complete()
def fly_rangefinder_drivers_fly(self, rangefinders):
'''ensure rangefinder gives height-above-ground'''
self.change_mode('GUIDED')
@ -6543,6 +6554,10 @@ class AutoTestCopter(AutoTest): @@ -6543,6 +6554,10 @@ class AutoTestCopter(AutoTest):
"Test random aux mode options",
self.test_aux_switch_options),
("AuxFunctionsInMission",
"Test use of auxilliary functions in missions",
self.test_aux_functions_in_mission),
("AutoTune",
"Fly AUTOTUNE mode",
self.fly_autotune), # 73s

Loading…
Cancel
Save