1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-19 06:15:08 +03:00

[Horus] No more errors in Lua interface compilation

This commit is contained in:
Bertrand Songis 2015-11-25 21:38:05 +01:00
parent 791b1173e3
commit 71f08998dd
5 changed files with 29 additions and 19 deletions

View file

@ -80,7 +80,9 @@ static int luaModelSetInfo(lua_State *L)
if (!strcmp(key, "name")) {
const char * name = luaL_checkstring(L, -1);
str2zchar(g_model.header.name, name, sizeof(g_model.header.name));
#if defined(EEPROM)
memcpy(modelHeaders[g_eeGeneral.currModel].name, g_model.header.name, sizeof(g_model.header.name));
#endif
}
else if (!strcmp(key, "bitmap")) {
const char * name = luaL_checkstring(L, -1);
@ -153,7 +155,10 @@ static int luaModelSetModule(lua_State *L)
module.rfProtocol = luaL_checkinteger(L, -1);
}
else if (!strcmp(key, "modelId")) {
g_model.header.modelId[idx] = modelHeaders[g_eeGeneral.currModel].modelId[idx] = luaL_checkinteger(L, -1);
g_model.header.modelId[idx] = luaL_checkinteger(L, -1);
#if defined(EEPROM)
modelHeaders[g_eeGeneral.currModel].modelId[idx] = g_model.header.modelId[idx];
#endif
}
else if (!strcmp(key, "firstChannel")) {
module.channelsStart = luaL_checkinteger(L, -1);