Merge branch '2.3' into 2.4

This commit is contained in:
Raphael Coeffic
2021-05-16 12:55:21 +02:00
150 changed files with 7726 additions and 4099 deletions
+14
View File
@@ -1537,6 +1537,19 @@ static int luaGetUsage(lua_State * L)
return 1;
}
/*luadoc
@function getAvailableMemory()
Get available memory remaining in the Heap for Lua.
@retval usage (number) a value returned in b
*/
static int luaGetAvailableMemory(lua_State * L)
{
lua_pushunsigned(L, availableMemory());
return 1;
}
/*luadoc
@function resetGlobalTimer([type])
@@ -1764,6 +1777,7 @@ const luaL_Reg opentxLib[] = {
{ "chdir", luaChdir },
{ "loadScript", luaLoadScript },
{ "getUsage", luaGetUsage },
{ "getAvailableMemory", luaGetAvailableMemory },
{ "resetGlobalTimer", luaResetGlobalTimer },
#if LCD_DEPTH > 1 && !defined(COLORLCD)
{ "GREY", luaGrey },