diff --git a/radio/src/lua/api_model.cpp b/radio/src/lua/api_model.cpp index 842fb8613..8301d686f 100644 --- a/radio/src/lua/api_model.cpp +++ b/radio/src/lua/api_model.cpp @@ -292,6 +292,8 @@ static int luaModelGetTimer(lua_State *L) lua_pushtableinteger(L, "persistent", timer.persistent); lua_pushtablenstring(L, "name", timer.name); lua_pushtableboolean(L, "showElapsed", timer.showElapsed); + lua_pushtableinteger(L, "switch", timer.swtch); + lua_pushtableinteger(L, "countdownStart", timer.countdownStart); } else { lua_pushnil(L); @@ -348,6 +350,12 @@ static int luaModelSetTimer(lua_State *L) else if (!strcmp(key, "showElapsed")) { timer.showElapsed = lua_toboolean(L, -1); } + else if (!strcmp(key, "switch")) { + timer.swtch = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "countdownStart")) { + timer.countdownStart = luaL_checkinteger(L, -1); + } } storageDirty(EE_MODEL); }