Fixes #1879 - Tests needed (differential is now applied before

weight/offset), just like other curves
This commit is contained in:
bsongis
2014-12-11 07:26:10 +01:00
parent 91e52f82c6
commit f008e6ad88
+2 -6
View File
@@ -875,7 +875,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
//========== CURVES ===============
#if defined(PCBTARANIS)
if (apply_offset_and_curve && md->curve.type != CURVE_REF_DIFF && md->curve.value) {
if (apply_offset_and_curve && md->curve.value) {
v = applyCurve(v, md->curve);
}
#else
@@ -894,11 +894,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
}
//========== DIFFERENTIAL =========
#if defined(PCBTARANIS)
if (md->curve.type == CURVE_REF_DIFF && md->curve.value) {
dv = applyCurve(dv, md->curve);
}
#else
#if !defined(PCBTARANIS)
if (md->curveMode == MODE_DIFFERENTIAL) {
// @@@2 also recalculate curveParam to a 256 basis which ease the calculation later a lot
int16_t curveParam = calc100to256(GET_GVAR(md->curveParam, -100, 100, mixerCurrentFlightMode));