diff --git a/libraries/RC_Channel/SRV_Channel.cpp b/libraries/RC_Channel/SRV_Channel.cpp index 8aa27aee69..4957cdbdee 100644 --- a/libraries/RC_Channel/SRV_Channel.cpp +++ b/libraries/RC_Channel/SRV_Channel.cpp @@ -19,6 +19,7 @@ */ #include +#include #include "SRV_Channel.h" #include "RC_Channel.h" @@ -205,6 +206,7 @@ uint16_t SRV_Channels::remap_pwm(uint8_t i, uint16_t pwm) const radio_out = servo_trim[i] + v * (servo_trim[i] - servo_min[i]); } } + radio_out = constrain_int16(radio_out, servo_min[i], servo_max[i]); return radio_out; }