The background function is not anymore mandatory in Telemetry scripts

This commit is contained in:
bsongis
2014-07-01 14:45:39 +02:00
parent ef0b81cd2d
commit 74dfd64e29
+4
View File
@@ -1137,6 +1137,7 @@ void luaInit()
// Push OpenTX constants
lua_registerint(L, "FULLSCALE", RESX);
lua_registerint(L, "XXLSIZE", XXLSIZE);
lua_registerint(L, "DBLSIZE", DBLSIZE);
lua_registerint(L, "MIDSIZE", MIDSIZE);
lua_registerint(L, "SMLSIZE", SMLSIZE);
@@ -1554,6 +1555,9 @@ void luaTask(uint8_t evt)
else if (sid.background) {
lua_rawgeti(L, LUA_REGISTRYINDEX, sid.background);
}
else {
continue;
}
}
if (lua_pcall(L, inputsCount, sio ? sio->outputsCount : 0, 0) == 0) {
if (sio) {