1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +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

@ -1,3 +1,11 @@
<h2>Version 2.1.2 / <set date></h2>
<ul>
<li>Fixed: Lua model scripts outputs not working in a simulator (<a href=https://github.com/opentx/opentx/issues/2684>#2684</a>)</li>
</ul>
<h2>Version 2.1.1 / 2015-08-06</h2>
<ul>
<li>Vario source and center silent options were not saved(<a href=https://github.com/opentx/opentx/issues/2476>#2476</a>)</li>

View file

@ -41,14 +41,15 @@
#define GRAPHICS
#define CURVES
#if defined(PCBTARANIS)
#define RTCLOCK
#define XCURVES
#define VIRTUALINPUTS
#define LUA
#define LUA_MODEL_SCRIPTS
#define RTCLOCK
#define XCURVES
#define VIRTUALINPUTS
#define LUA
#define LUA_MODEL_SCRIPTS
#define LUAINPUTS
#else
#define BUZZER
#define TEMPLATES
#define BUZZER
#define TEMPLATES
#endif
#define BOLD_FONT
#define HAPTIC
@ -61,17 +62,17 @@
#endif
#if defined(PCBSKY9X) && !defined(REVX)
#define ROTARY_ENCODERS 1
#define ROTARY_ENCODERS 1
#elif defined(PCBGRUVIN9X)
#define ROTARY_ENCODERS 2
#define ROTARY_ENCODERS 2
#endif
#if defined(CPUARM)
#define FRSKY_SPORT
#define FRSKY_SPORT
#endif
#if defined (PCBTARANIS)
#define MIXERS_MONITOR
#define MIXERS_MONITOR
#endif
#undef min

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);