mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 14:25:11 +03:00
Update api_general.cpp
This commit is contained in:
parent
ef90933f66
commit
c8bd18441a
1 changed files with 14 additions and 0 deletions
|
@ -1532,6 +1532,19 @@ static int luaGetUsage(lua_State * L)
|
||||||
return 1;
|
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
|
/*luadoc
|
||||||
@function resetGlobalTimer([type])
|
@function resetGlobalTimer([type])
|
||||||
|
|
||||||
|
@ -1759,6 +1772,7 @@ const luaL_Reg opentxLib[] = {
|
||||||
{ "chdir", luaChdir },
|
{ "chdir", luaChdir },
|
||||||
{ "loadScript", luaLoadScript },
|
{ "loadScript", luaLoadScript },
|
||||||
{ "getUsage", luaGetUsage },
|
{ "getUsage", luaGetUsage },
|
||||||
|
{ "getAvailableMemory", luaGetAvailableMemory },
|
||||||
{ "resetGlobalTimer", luaResetGlobalTimer },
|
{ "resetGlobalTimer", luaResetGlobalTimer },
|
||||||
#if LCD_DEPTH > 1 && !defined(COLORLCD)
|
#if LCD_DEPTH > 1 && !defined(COLORLCD)
|
||||||
{ "GREY", luaGrey },
|
{ "GREY", luaGrey },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue