Skip to content

Commit 168b088

Browse files
committed
ArduCopter: add AP_Arming::Method::TOYMODE
as determined at DevCall
1 parent ff376b3 commit 168b088

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ArduCopter/AP_Arming_Copter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ bool AP_Arming_Copter::arm_checks(AP_Arming::Method method)
568568
{
569569
if (method == AP_Arming::Method::RUDDER) {
570570
#if TOY_MODE_ENABLED
571-
if (g2.toy_mode.enabled()) {
571+
if (copter.g2.toy_mode.enabled()) {
572572
// not armed with sticks in toy mode
573573
check_failed(true, "Rudder-arming: disabled in toy mode");
574574
return false;

ArduCopter/toy_mode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ void ToyMode::action_arm(void)
803803
// we want GPS and checks are passing, arm and enable fence
804804
copter.fence.enable(true, AC_FENCE_ALL_FENCES);
805805
#endif
806-
copter.arming.arm(AP_Arming::Method::RUDDER);
806+
copter.arming.arm(AP_Arming::Method::TOYMODE);
807807
if (!copter.motors->armed()) {
808808
AP_Notify::events.arming_failed = true;
809809
gcs().send_text(MAV_SEVERITY_ERROR, "Tmode: GPS arming failed");
@@ -819,7 +819,7 @@ void ToyMode::action_arm(void)
819819
// non-GPS mode
820820
copter.fence.enable(false, AC_FENCE_ALL_FENCES);
821821
#endif
822-
copter.arming.arm(AP_Arming::Method::RUDDER);
822+
copter.arming.arm(AP_Arming::Method::TOYMODE);
823823
if (!copter.motors->armed()) {
824824
AP_Notify::events.arming_failed = true;
825825
gcs().send_text(MAV_SEVERITY_ERROR, "Tmode: non-GPS arming failed");

0 commit comments

Comments
 (0)