Cosmetics
This commit is contained in:
@@ -1785,7 +1785,8 @@ void copyTrimsToOffset(uint8_t ch)
|
|||||||
|
|
||||||
int16_t output = applyLimits(ch, chans[ch]) - zero;
|
int16_t output = applyLimits(ch, chans[ch]) - zero;
|
||||||
int16_t v = g_model.limitData[ch].offset;
|
int16_t v = g_model.limitData[ch].offset;
|
||||||
if (g_model.limitData[ch].revert) output = -output;
|
if (g_model.limitData[ch].revert)
|
||||||
|
output = -output;
|
||||||
v += (output * 125) / 128;
|
v += (output * 125) / 128;
|
||||||
g_model.limitData[ch].offset = limit((int16_t)-1000, (int16_t)v, (int16_t)1000); // make sure the offset doesn't go haywire
|
g_model.limitData[ch].offset = limit((int16_t)-1000, (int16_t)v, (int16_t)1000); // make sure the offset doesn't go haywire
|
||||||
|
|
||||||
@@ -1869,7 +1870,8 @@ void moveTrimsToOffsets() // copy state of 3 primary to subtrim
|
|||||||
for (uint8_t i=0; i<MAX_OUTPUT_CHANNELS; i++) {
|
for (uint8_t i=0; i<MAX_OUTPUT_CHANNELS; i++) {
|
||||||
int16_t output = applyLimits(i, chans[i]) - zeros[i];
|
int16_t output = applyLimits(i, chans[i]) - zeros[i];
|
||||||
int16_t v = g_model.limitData[i].offset;
|
int16_t v = g_model.limitData[i].offset;
|
||||||
if (g_model.limitData[i].revert) output = -output;
|
if (g_model.limitData[i].revert)
|
||||||
|
output = -output;
|
||||||
v += (output * 125) / 128;
|
v += (output * 125) / 128;
|
||||||
g_model.limitData[i].offset = limit((int16_t)-1000, (int16_t)v, (int16_t)1000); // make sure the offset doesn't go haywire
|
g_model.limitData[i].offset = limit((int16_t)-1000, (int16_t)v, (int16_t)1000); // make sure the offset doesn't go haywire
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user