From a6af0e87fc4040d9d7d5dd3d6f2ae65a9a9e4107 Mon Sep 17 00:00:00 2001 From: murata Date: Mon, 30 Aug 2021 22:30:33 +0900 Subject: [PATCH] Copter: Change the auto mode judgment to address --- ArduCopter/RC_Channel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/RC_Channel.cpp b/ArduCopter/RC_Channel.cpp index f021f93c3d..0038a16b6d 100644 --- a/ArduCopter/RC_Channel.cpp +++ b/ArduCopter/RC_Channel.cpp @@ -198,7 +198,7 @@ bool RC_Channel_Copter::do_aux_function(const aux_func_t ch_option, const AuxSwi if (ch_flag == RC_Channel::AuxSwitchPos::HIGH) { // do not allow saving new waypoints while we're in auto or disarmed - if (copter.flightmode->mode_number() == Mode::Number::AUTO || copter.flightmode->mode_number() == Mode::Number::AUTO_RTL || !copter.motors->armed()) { + if (copter.flightmode == &copter.mode_auto || !copter.motors->armed()) { break; }