diff --git a/libraries/AP_Motors/AP_MotorsMatrix.cpp b/libraries/AP_Motors/AP_MotorsMatrix.cpp index b4bc88c747be7b57d3194cd857b81ef2e864c15a..bee280c2e59b14004e57ce3ce8f48115df47cd72 100644 --- a/libraries/AP_Motors/AP_MotorsMatrix.cpp +++ b/libraries/AP_Motors/AP_MotorsMatrix.cpp @@ -250,7 +250,7 @@ void AP_MotorsMatrix::output_armed() thr_adj = _rc_throttle->radio_out - out_best_thr_pwm; // calc upper and lower limits of thr_adj - int16_t thr_adj_max = out_max_pwm-(out_best_thr_pwm+rpy_high); + int16_t thr_adj_max = max(out_max_pwm-(out_best_thr_pwm+rpy_high),0); // if we are increasing the throttle (situation #2 above).. if (thr_adj > 0) {