Use ETX instead of OTX (also as a file extension).

This commit is contained in:
rotorman
2021-12-31 10:53:08 +01:00
committed by Raphael Coeffic
parent 20961e460b
commit 89517d8bd8
29 changed files with 103 additions and 99 deletions
+1 -1
View File
@@ -1507,7 +1507,7 @@ then the loaded script (or "chunk") is returned as a function. Otherwise, return
as part of the file name and the .lua/.luac will be appended to that.
@param mode (string) (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac)
version of the script. By default OTx will load the newest version and compile a new binary if necessary (overwriting any
version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any
existing .luac version of the same script, and stripping some debug info like line numbers).
You can use `mode` to control the loading behavior more specifically. Possible values are:
* `b` only binary.
+3 -3
View File
@@ -158,7 +158,7 @@ static int luaModelGetModule(lua_State *L)
if (module.type == MODULE_TYPE_MULTIMODULE) {
int protocol = g_model.moduleData[idx].getMultiProtocol() + 1;
int subprotocol = g_model.moduleData[idx].subType;
convertOtxProtocolToMulti(&protocol, &subprotocol); // Special treatment for the FrSky entry...
convertEtxProtocolToMulti(&protocol, &subprotocol); // Special treatment for the FrSky entry...
lua_pushtableinteger(L, "protocol", protocol);
lua_pushtableinteger(L, "subProtocol", subprotocol);
if (getMultiModuleStatus(idx).isValid()) {
@@ -231,8 +231,8 @@ static int luaModelSetModule(lua_State *L)
#endif
}
#if defined(MULTIMODULE)
if (protocol > 0 && subprotocol >= 0) { // Both are needed to compute otx protocol
convertMultiProtocolToOtx(&protocol, &subprotocol);
if (protocol > 0 && subprotocol >= 0) { // Both are needed to compute etx protocol
convertMultiProtocolToEtx(&protocol, &subprotocol);
g_model.moduleData[idx].setMultiProtocol(protocol - 1);
g_model.moduleData[idx].subType = subprotocol;
}