Plane: prevent trim values out of range for PX4 mixer

thanks to Brian Christal for a good bug report!
This commit is contained in:
Andrew Tridgell 2015-05-17 21:24:46 +10:00
parent 29f0561ce4
commit db871cc581

View File

@ -272,7 +272,7 @@ static bool setup_failsafe_mixing(void)
// by small numbers near RC3_MIN
config.rc_trim = 1500;
} else {
config.rc_trim = ch->radio_trim;
config.rc_trim = constrain_int16(ch->radio_trim, config.rc_min, config.rc_max);
}
config.rc_dz = 0; // zero for the purposes of manual takeover
config.rc_assignment = i;