mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 12:55:12 +03:00
parent
0a8917cbe2
commit
42443c5c95
12 changed files with 1298 additions and 10 deletions
|
@ -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 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue