Hotfix: Apply same (correc) deadzone logic from IO fix to FMU as well

This commit is contained in:
Lorenz Meier 2013-03-21 07:59:44 +01:00
parent 99054e76fb
commit bee896786a
1 changed files with 1 additions and 1 deletions

View File

@ -1157,7 +1157,7 @@ Sensors::ppm_poll()
_rc.chan[i].scaled = (rc_input.values[i] - _parameters.trim[i] - _parameters.dz[i]) / (float)(_parameters.max[i] - _parameters.trim[i] - _parameters.dz[i]); _rc.chan[i].scaled = (rc_input.values[i] - _parameters.trim[i] - _parameters.dz[i]) / (float)(_parameters.max[i] - _parameters.trim[i] - _parameters.dz[i]);
} else if (rc_input.values[i] < (_parameters.trim[i] - _parameters.dz[i])) { } else if (rc_input.values[i] < (_parameters.trim[i] - _parameters.dz[i])) {
_rc.chan[i].scaled = (rc_input.values[i] - _parameters.trim[i] - _parameters.dz[i]) / (float)(_parameters.trim[i] - _parameters.min[i] - _parameters.dz[i]); _rc.chan[i].scaled = (rc_input.values[i] - _parameters.trim[i] + _parameters.dz[i]) / (float)(_parameters.trim[i] - _parameters.min[i] - _parameters.dz[i]);
} else { } else {
/* in the configured dead zone, output zero */ /* in the configured dead zone, output zero */