1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 12:55:12 +03:00
Fixes #6679
This commit is contained in:
Bertrand Songis 2019-09-10 16:46:23 +02:00 committed by GitHub
parent 0a8917cbe2
commit 42443c5c95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1298 additions and 10 deletions

View file

@ -1357,6 +1357,24 @@ static int luaGetRSSI(lua_State * L)
return 3;
}
/*luadoc
@function chdir(directory)
Change the working directory
@param directory (string) New working directory
@status current Introduced in 2.3.0
*/
static int luaChdir(lua_State * L)
{
const char * directory = luaL_optstring(L, 1, nullptr);
f_chdir(directory);
return 0;
}
/*luadoc
@function loadScript(file [, mode], [,env])
@ -1554,6 +1572,7 @@ const luaL_Reg opentxLib[] = {
{ "defaultChannel", luaDefaultChannel },
{ "getRSSI", luaGetRSSI },
{ "killEvents", luaKillEvents },
{ "chdir", luaChdir },
{ "loadScript", luaLoadScript },
{ "getUsage", luaGetUsage },
{ "resetGlobalTimer", luaResetGlobalTimer },