1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 19:40:20 +03:00

[simulation] Fix reported multi-position switch output being outside of normal range due to SIMU exception in mixer.cpp.

This commit is contained in:
Max Paperno 2017-03-27 01:29:14 -04:00
parent 6c28efdd4f
commit aaaaf1a806

View file

@ -428,10 +428,10 @@ void evalInputs(uint8_t mode)
uint8_t ch = (i < NUM_STICKS ? CONVERT_MODE(i) : i); uint8_t ch = (i < NUM_STICKS ? CONVERT_MODE(i) : i);
int16_t v = anaIn(i); int16_t v = anaIn(i);
#if !defined(SIMU)
if (IS_POT_MULTIPOS(i)) { if (IS_POT_MULTIPOS(i)) {
v -= RESX; v -= RESX;
} }
#if !defined(SIMU)
else { else {
CalibData * calib = &g_eeGeneral.calib[i]; CalibData * calib = &g_eeGeneral.calib[i];
v -= calib->mid; v -= calib->mid;