|
|
|
@ -136,6 +136,13 @@ void pwm_limit_calc(const bool armed, const unsigned num_channels, const uint16_
@@ -136,6 +136,13 @@ void pwm_limit_calc(const bool armed, const unsigned num_channels, const uint16_
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
effective_pwm[i] = output[i] * (max_pwm[i] - ramp_min_pwm)/2 + (max_pwm[i] + ramp_min_pwm)/2; |
|
|
|
|
|
|
|
|
|
/* last line of defense against invalid inputs */ |
|
|
|
|
if (effective_pwm[i] < ramp_min_pwm) { |
|
|
|
|
effective_pwm[i] = ramp_min_pwm; |
|
|
|
|
} else if (effective_pwm[i] > max_pwm[i]) { |
|
|
|
|
effective_pwm[i] = max_pwm[i]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|