Skip to content

Commit

Permalink
autotest: test new safety switch command
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Feb 27, 2024
1 parent ae504ba commit 9aa6193
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10281,6 +10281,12 @@ def SafetySwitch(self):
self.change_mode('LAND')
self.wait_disarmed()

# test turning safty on/off using explicit MAVLink command:
self.run_cmd_int(mavutil.mavlink.MAV_CMD_DO_SET_SAFETY_SWITCH_STATE, mavutil.mavlink.SAFETY_SWITCH_STATE_SAFE)
self.assert_prearm_failure("safety switch")
self.run_cmd_int(mavutil.mavlink.MAV_CMD_DO_SET_SAFETY_SWITCH_STATE, mavutil.mavlink.SAFETY_SWITCH_STATE_DANGEROUS)
self.wait_ready_to_arm()

def GuidedYawRate(self):
'''ensuer guided yaw rate is not affected by rate of sewt-attitude messages'''
self.takeoff(30, mode='GUIDED')
Expand Down

0 comments on commit 9aa6193

Please sign in to comment.