Skip to content

Commit 3c00e9b

Browse files
committed
autotest: add test for GuidedModeThrust
1 parent 1cafe25 commit 3c00e9b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Tools/autotest/arducopter.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10843,6 +10843,27 @@ def LoiterToGuidedHomeVSOrigin(self):
1084310843
self.disarm_vehicle(force=True)
1084410844
self.reboot_sitl() # to "unstick" home
1084510845

10846+
def GuidedModeThrust(self):
10847+
'''test handling of option-bit-3, where mavlink commands are
10848+
intrepreted as thrust not climb rate'''
10849+
self.set_parameter('GUID_OPTIONS', 8)
10850+
self.change_mode('GUIDED')
10851+
self.wait_ready_to_arm()
10852+
self.arm_vehicle()
10853+
self.mav.mav.set_attitude_target_send(
10854+
0, # time_boot_ms
10855+
1, # target sysid
10856+
1, # target compid
10857+
0, # bitmask of things to ignore
10858+
mavextra.euler_to_quat([0, 0, 0]), # att
10859+
0, # roll rate (rad/s)
10860+
0, # pitch rate (rad/s)
10861+
0, # yaw rate (rad/s)
10862+
0.5
10863+
) # thrust, 0 to 1
10864+
self.wait_altitude(0.5, 100, relative=True, timeout=10)
10865+
self.do_RTL()
10866+
1084610867
def tests2b(self): # this block currently around 9.5mins here
1084710868
'''return list of all tests'''
1084810869
ret = ([
@@ -10922,6 +10943,7 @@ def tests2b(self): # this block currently around 9.5mins here
1092210943
self.GPSForYawCompassLearn,
1092310944
self.CameraLogMessages,
1092410945
self.LoiterToGuidedHomeVSOrigin,
10946+
self.GuidedModeThrust,
1092510947
])
1092610948
return ret
1092710949

@@ -10952,6 +10974,7 @@ def disabled_tests(self):
1095210974
"GroundEffectCompensation_touchDownExpected": "Flapping",
1095310975
"FlyMissionTwice": "See https://github.com/ArduPilot/ardupilot/pull/18561",
1095410976
"GPSForYawCompassLearn": "Vehicle currently crashed in spectacular fashion",
10977+
"GuidedModeThrust": "land detector raises internal error as we're not saying we're about to take off but just did",
1095510978
}
1095610979

1095710980

0 commit comments

Comments
 (0)