Fix motor range

This commit is contained in:
Lorenz Meier 2017-01-19 23:21:11 +01:00
parent 41ff46b557
commit 264589b2cc
1 changed files with 1 additions and 1 deletions

View File

@ -667,7 +667,7 @@ TAP_ESC::cycle()
if (i < _outputs.noutputs &&
PX4_ISFINITE(_outputs.output[i])) {
/* scale for PWM output 1200 - 1900us */
_outputs.output[i] = (RPMMAX + RPMMIN) / 2 + ((RPMMAX - RPMMIN) / 2) * _outputs.output[i]);
_outputs.output[i] = (RPMMAX + RPMMIN) / 2 + ((RPMMAX - RPMMIN) / 2) * _outputs.output[i];
math::constrain(_outputs.output[i], (float)RPMMIN, (float)RPMMAX);
} else {