From 9fd14dbf94d9353ed07ffac95000aa0a0f5cf171 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 16 Feb 2022 17:17:23 +0000 Subject: [PATCH] Plane: quadplane: set IO failsafe limit for all motors --- ArduPlane/quadplane.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 5c8d939cfe..460d7fb889 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -701,11 +701,8 @@ bool QuadPlane::setup(void) // setup the trim of any motors used by AP_Motors so I/O board // failsafe will disable motors - for (uint8_t i=0; i<8; i++) { - SRV_Channel::Aux_servo_function_t func = SRV_Channels::get_motor_function(i); - SRV_Channels::set_failsafe_pwm(func, motors->get_pwm_output_min()); - } - + uint16_t mask = plane.quadplane.motors->get_motor_mask(); + hal.rcout->set_failsafe_pwm(mask, plane.quadplane.motors->get_pwm_output_min()); // default QAssist state as set with Q_OPTIONS if ((options & OPTION_Q_ASSIST_FORCE_ENABLE) != 0) {