1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-17 05:15:18 +03:00

Fixes #2684: Lua model scripts outputs not working in a simulator

This commit is contained in:
Damjan Adamic 2015-08-15 12:59:35 +02:00
parent affda2d8fe
commit 4d83dd2c24
3 changed files with 24 additions and 11 deletions

View file

@ -260,7 +260,11 @@ getvalue_t getValue(mixsrc_t i)
}
#endif
#if defined(LUAINPUTS)
else if (i<=MIXSRC_LAST_POT) return calibratedStick[i-MIXSRC_Rud];
#else
else if (i>=MIXSRC_FIRST_STICK && i<=MIXSRC_LAST_POT) return calibratedStick[i-MIXSRC_Rud];
#endif
#if defined(PCBGRUVIN9X) || defined(PCBMEGA2560) || defined(ROTARY_ENCODERS)
else if (i<=MIXSRC_LAST_ROTARY_ENCODER) return getRotaryEncoder(i-MIXSRC_REa);