@@ -10649,6 +10649,44 @@ def ArmFeatures(self):
10649
10649
self.set_rc(interlock_channel, 1000)
10650
10650
raise NotAchievedException("Motor interlock was changed while disarmed")
10651
10651
self.set_rc(interlock_channel, 1000)
10652
+ elif self.is_plane():
10653
+ self.start_subtest("Test arming failure with interlock enabled")
10654
+ interlock_channel = 9
10655
+ self.set_parameter("RC%u_OPTION" % interlock_channel, 32)
10656
+ # enable all plane interlock optons, 31 turns on all flags
10657
+ self.set_parameter("ILCK_OPTIONS", 31)
10658
+ # interlock must be help high to disable arm/disarm/interlock
10659
+ self.reboot_sitl() # needed for CAM1_TYPE to take effect
10660
+ self.set_rc(interlock_channel, 2000)
10661
+ try:
10662
+ self.arm_motors_with_rc_input()
10663
+ except NotAchievedException:
10664
+ pass
10665
+ if self.armed():
10666
+ raise NotAchievedException(
10667
+ "Armed with RC input when interlock enabled")
10668
+ try:
10669
+ self.arm_motors_with_switch(arming_switch)
10670
+ except NotAchievedException:
10671
+ pass
10672
+ if self.armed():
10673
+ raise NotAchievedException("Armed with switch when interlock enabled")
10674
+ self.disarm_vehicle()
10675
+
10676
+ self.progress("arm with mavproxy")
10677
+ mavproxy = self.start_mavproxy()
10678
+ if self.mavproxy_arm_vehicle(mavproxy):
10679
+ raise NotAchievedException("Armed with mavproxy with interlock enabled")
10680
+ self.stop_mavproxy(mavproxy)
10681
+
10682
+ self.wait_heartbeat()
10683
+ self.set_rc(arming_switch, 1000)
10684
+ self.set_rc(interlock_channel, 1000)
10685
+ self.set_parameter("RC%u_OPTION" % interlock_channel, 0)
10686
+ # enable all plane interlock optons, 31 turns on all flags
10687
+ self.set_parameter("ILCK_OPTIONS", 1)
10688
+ # interlock must be help high to disable arm/disarm/interlock
10689
+ self.reboot_sitl() # needed to disable the interlock channel
10652
10690
10653
10691
self.start_subtest("Test all mode arming")
10654
10692
self.wait_ready_to_arm()
0 commit comments