Merge with latest 2.3

This commit is contained in:
Bertrand Songis
2020-03-05 10:43:01 +01:00
144 changed files with 3009 additions and 1035 deletions
+8 -2
View File
@@ -182,8 +182,9 @@ Get model timer parameters
* `countdownBeep` (number) countdown beep (0­ = silent, 1 =­ beeps, 2­ = voice)
* `minuteBeep` (boolean) minute beep
* `persistent` (number) persistent timer
* `name` (string) timer name
@status current Introduced in 2.0.0
@status current Introduced in 2.0.0, name added in 2.3.6
*/
static int luaModelGetTimer(lua_State *L)
{
@@ -197,6 +198,7 @@ static int luaModelGetTimer(lua_State *L)
lua_pushtableinteger(L, "countdownBeep", timer.countdownBeep);
lua_pushtableboolean(L, "minuteBeep", timer.minuteBeep);
lua_pushtableinteger(L, "persistent", timer.persistent);
lua_pushtablezstring(L, "name", timer.name);
}
else {
lua_pushnil(L);
@@ -216,7 +218,7 @@ Set model timer parameters
@notice If a parameter is missing from the value, then
that parameter remains unchanged.
@status current Introduced in 2.0.0
@status current Introduced in 2.0.0, name added in 2.3.6
*/
static int luaModelSetTimer(lua_State *L)
{
@@ -246,6 +248,10 @@ static int luaModelSetTimer(lua_State *L)
else if (!strcmp(key, "persistent")) {
timer.persistent = luaL_checkinteger(L, -1);
}
if (!strcmp(key, "name")) {
const char * name = luaL_checkstring(L, -1);
str2zchar(timer.name, name, sizeof(timer.name));
}
}
storageDirty(EE_MODEL);
}