mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 12:25:12 +03:00
luaRegister function removed
This commit is contained in:
parent
acb7f1e17f
commit
fe901dabdf
1 changed files with 7 additions and 15 deletions
|
@ -326,28 +326,21 @@ bool luaFindFieldByName(const char * name, LuaField & field, unsigned int flags)
|
|||
return false; // not found
|
||||
}
|
||||
|
||||
static int luaTelemetryRegister(lua_State *L)
|
||||
static int luaTelemetryPop(lua_State *L)
|
||||
{
|
||||
if (!luaTelemetryFifo) {
|
||||
luaTelemetryFifo = new Fifo<LuaTelemetryValue, 16>();
|
||||
if (!luaTelemetryFifo) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int luaTelemetryPop(lua_State *L)
|
||||
{
|
||||
if (luaTelemetryFifo) {
|
||||
LuaTelemetryValue value;
|
||||
if (luaTelemetryFifo->pop(value)) {
|
||||
lua_pushnumber(L, value.id);
|
||||
lua_pushunsigned(L, value.value);
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -820,7 +813,6 @@ const luaL_Reg opentxLib[] = {
|
|||
#if !defined(COLORLCD)
|
||||
{ "GREY", luaGrey },
|
||||
#endif
|
||||
{ "telemetryRegister", luaTelemetryRegister },
|
||||
{ "telemetryPop", luaTelemetryPop },
|
||||
{ NULL, NULL } /* sentinel */
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue