diff --git a/APMrover2/mode.h b/APMrover2/mode.h index 7312935fc7..a016f19c15 100644 --- a/APMrover2/mode.h +++ b/APMrover2/mode.h @@ -39,11 +39,11 @@ public: // attributes of the mode // - // return if in non-manual mode : AUTO, GUIDED, RTL + // return if in non-manual mode : Auto, Guided, RTL, SmartRTL virtual bool is_autopilot_mode() const { return false; } - // returns true if the throttle is controlled automatically - virtual bool auto_throttle() { return is_autopilot_mode(); } + // returns true if vehicle can be armed or disarmed from the transmitter in this mode + virtual bool allows_arming_from_transmitter() { return !is_autopilot_mode(); } // // attributes for mavlink system status reporting diff --git a/APMrover2/radio.cpp b/APMrover2/radio.cpp index 6565e47c7b..837b693c1c 100644 --- a/APMrover2/radio.cpp +++ b/APMrover2/radio.cpp @@ -52,8 +52,8 @@ void Rover::rudder_arm_disarm_check() return; } - // if not in a manual throttle mode then disallow rudder arming/disarming - if (control_mode->auto_throttle()) { + // check if arming/disarming allowed from this mode + if (!control_mode->allows_arming_from_transmitter()) { rudder_arm_timer = 0; return; }