Addressed the requests in issue #1285
`getfieldInfo` can now also take a source index as argument. Plus it was modified to also handle "telem1+" etc. New functions `getSourceIndex(sourceName)` and `getSourceName(sourceIndex)` were added, which use the names shown on the screen instead of the special names table used by `getFieldInfo` and `getValue`. Indices are the same for all of the functions, so `getValue(sourceIndex)` also works with indices from `getSourceIndex`. New iterator functions `sources([first[, last]])` and `switches([first[, last]])` for getting ranges of sources and switches. `getPhysicalSwitches` was removed, as I consider the iterator function to be a better solution.
This commit is contained in:
committed by
Peter Feerick
parent
351643b652
commit
f2a360c9d3
@@ -208,10 +208,12 @@ extern uint8_t instructionsPercent;
|
||||
|
||||
struct LuaField {
|
||||
uint16_t id;
|
||||
char name[20];
|
||||
char desc[50];
|
||||
};
|
||||
|
||||
bool luaFindFieldByName(const char * name, LuaField & field, unsigned int flags=0);
|
||||
bool luaFindFieldById(int id, LuaField & field, unsigned int flags=0);
|
||||
void luaLoadThemes();
|
||||
void luaRegisterLibraries(lua_State * L);
|
||||
void registerBitmapClass(lua_State * L);
|
||||
|
||||
Reference in New Issue
Block a user