From f8e6fd7b2d2697df3c97d50d70dc4e22c0aaa759 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 5 Oct 2014 14:54:29 +0200 Subject: [PATCH] Fixes #1755 (on next branch): LUA get/setTimer(): inconsistent timer struct --- radio/src/lua.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/lua.cpp b/radio/src/lua.cpp index 7f803097b..4e5ce6222 100644 --- a/radio/src/lua.cpp +++ b/radio/src/lua.cpp @@ -611,7 +611,7 @@ static int luaModelGetTimer(lua_State *L) lua_pushtableinteger(L, "value", timersStates[idx].val); lua_pushtableinteger(L, "countdownBeep", timer.countdownBeep); lua_pushtableboolean(L, "minuteBeep", timer.minuteBeep); - lua_pushtableboolean(L, "persistent", timer.persistent); + lua_pushtableinteger(L, "persistent", timer.persistent); } else { lua_pushnil(L); @@ -642,7 +642,7 @@ static int luaModelSetTimer(lua_State *L) timer.countdownBeep = luaL_checkinteger(L, -1); } else if (!strcmp(key, "minuteBeep")) { - timer.minuteBeep = luaL_checkinteger(L, -1); + timer.minuteBeep = lua_toboolean(L, -1); } else if (!strcmp(key, "persistent")) { timer.persistent = luaL_checkinteger(L, -1);