New Table widget
This commit is contained in:
+4
-4
@@ -180,11 +180,11 @@ void applyExpos(int16_t * anas, uint8_t mode, uint8_t ovwrIdx, int16_t ovwrValue
|
||||
|
||||
//========== WEIGHT ===============
|
||||
int32_t weight = GET_GVAR_PREC1(ed->weight, -100, 100, mixerCurrentFlightMode);
|
||||
v = div_and_round((int32_t)v * weight, 1000);
|
||||
v = divRoundClosest((int32_t)v * weight, 1000);
|
||||
|
||||
//========== OFFSET ===============
|
||||
int32_t offset = GET_GVAR_PREC1(ed->offset, -100, 100, mixerCurrentFlightMode);
|
||||
if (offset) v += div_and_round(calc100toRESX(offset), 10);
|
||||
if (offset) v += divRoundClosest(calc100toRESX(offset), 10);
|
||||
|
||||
//========== TRIMS ================
|
||||
if (ed->carryTrim < TRIM_ON)
|
||||
@@ -794,12 +794,12 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
|
||||
|
||||
//========== WEIGHT ===============
|
||||
int32_t dv = (int32_t)v * weight;
|
||||
dv = div_and_round(dv, 10);
|
||||
dv = divRoundClosest(dv, 10);
|
||||
|
||||
//========== OFFSET / AFTER ===============
|
||||
if (applyOffsetAndCurve) {
|
||||
int32_t offset = GET_GVAR_PREC1(MD_OFFSET(md), GV_RANGELARGE_NEG, GV_RANGELARGE, mixerCurrentFlightMode);
|
||||
if (offset) dv += div_and_round(calc100toRESX_16Bits(offset), 10) << 8;
|
||||
if (offset) dv += divRoundClosest(calc100toRESX_16Bits(offset), 10) << 8;
|
||||
}
|
||||
|
||||
//========== DIFFERENTIAL =========
|
||||
|
||||
Reference in New Issue
Block a user