1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 11:29:51 +03:00

Fixes #4438: wrong cast used when setting Lua mixer script input source (#4470)

* Fixes #4438: wrong cast used when setting Lua mixer script input source
Improved parsing of Lua mixer script inputs

* Additional type check

* ScriptDataInput union introduced.
Fixed: when using SOURCE input, do not use default value
Fixed: when using SOURCE input, min-max range is fixed
This commit is contained in:
Damjan Adamic 2017-02-21 10:59:47 +01:00 committed by Bertrand Songis
parent 177acb95e5
commit f36d01d560
7 changed files with 65 additions and 35 deletions

View file

@ -453,10 +453,15 @@ PACK(struct SwashRingData {
#endif
#if MAX_SCRIPTS > 0
union ScriptDataInput {
int16_t value;
source_t source;
};
PACK(struct ScriptData {
char file[LEN_SCRIPT_FILENAME];
char name[LEN_SCRIPT_NAME];
int16_t inputs[MAX_SCRIPT_INPUTS];
char file[LEN_SCRIPT_FILENAME];
char name[LEN_SCRIPT_NAME];
ScriptDataInput inputs[MAX_SCRIPT_INPUTS];
});
#endif