mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-19 06:15:08 +03:00
Bsongis/lua interpreter added on x7d (#3999)
* [X7D] Lua option added (only standalone scripts) * [X7D] Compilation fix * [X7D] Compilation fix * [X7D] Compilation fix * [X7D] Compilation fix
This commit is contained in:
parent
35571ad4d1
commit
d58244ebde
23 changed files with 174 additions and 120 deletions
|
@ -39,7 +39,9 @@ static int luaModelGetInfo(lua_State *L)
|
|||
{
|
||||
lua_newtable(L);
|
||||
lua_pushtablezstring(L, "name", g_model.header.name);
|
||||
#if LCD_DEPTH > 1
|
||||
lua_pushtablenzstring(L, "bitmap", g_model.header.bitmap);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -68,10 +70,12 @@ static int luaModelSetInfo(lua_State *L)
|
|||
memcpy(modelHeaders[g_eeGeneral.currModel].name, g_model.header.name, sizeof(g_model.header.name));
|
||||
#endif
|
||||
}
|
||||
#if LCD_DEPTH > 1
|
||||
else if (!strcmp(key, "bitmap")) {
|
||||
const char * name = luaL_checkstring(L, -1);
|
||||
strncpy(g_model.header.bitmap, name, sizeof(g_model.header.bitmap));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
storageDirty(EE_MODEL);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue