Skip to content
Snippets Groups Projects
Commit fb703ff5 authored by Jonathan Challinger's avatar Jonathan Challinger Committed by Randy Mackay
Browse files

AP_Motors: properly constrain thr_adj_max

parent ddd4d881
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment