diff --git a/libraries/AP_HAL_PX4/RCOutput.cpp b/libraries/AP_HAL_PX4/RCOutput.cpp index 2ad060219b..94c919de95 100644 --- a/libraries/AP_HAL_PX4/RCOutput.cpp +++ b/libraries/AP_HAL_PX4/RCOutput.cpp @@ -435,6 +435,8 @@ void PX4RCOutput::_send_outputs(void) for (int i=to_send-1; i >= 0; i--) { if (_period[i] == 0 || _period[i] == PWM_IGNORE_THIS_CHANNEL) { to_send = i; + } else { + break; } } }