From aab8ad20d778a87c2118f625ccb3048cd90ac8ba Mon Sep 17 00:00:00 2001 From: Frankie Arzu <32604366+frankiearzu@users.noreply.github.com> Date: Sat, 26 Nov 2022 18:19:27 -0600 Subject: [PATCH] #766 Change way of dectecting EdgeTX Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15 --- Lua_scripts/DSM FwdPrg_05_BW.lua | 4 +++- Lua_scripts/DSM FwdPrg_05_Color.lua | 4 +++- Lua_scripts/DSMLIB/readme.md | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Lua_scripts/DSM FwdPrg_05_BW.lua b/Lua_scripts/DSM FwdPrg_05_BW.lua index 1865aad..a7fed61 100644 --- a/Lua_scripts/DSM FwdPrg_05_BW.lua +++ b/Lua_scripts/DSM FwdPrg_05_BW.lua @@ -387,7 +387,9 @@ end local function init_screen_pos() -- osName in OpenTX is nil, otherwise is EDGETX local ver, radio, maj, minor, rev, osname = getVersion() - IS_EDGETX = osname~=nil + if (osname==nil) then osname = "OpenTX" end -- OTX 2.3.14 and below returns nil + + IS_EDGETX = string.sub(osname,1,1) =='E' if LCD_W == 480 then -- TX16 -- use defaults in the script header diff --git a/Lua_scripts/DSM FwdPrg_05_Color.lua b/Lua_scripts/DSM FwdPrg_05_Color.lua index 4086c6b..5fad389 100644 --- a/Lua_scripts/DSM FwdPrg_05_Color.lua +++ b/Lua_scripts/DSM FwdPrg_05_Color.lua @@ -574,7 +574,9 @@ end local function init_colors() -- osName in OpenTX is nil, otherwise is EDGETX local ver, radio, maj, minor, rev, osname = getVersion() - IS_EDGETX = osname~=nil + if (osname==nil) then osname = "OpenTX" end -- OTX 2.3.14 and below returns nil + + IS_EDGETX = string.sub(osname,1,1) == 'E' if (IS_EDGETX and USE_SPECKTRUM_COLORS) then -- SPECKTRUM COLORS (only works on EDGETX) diff --git a/Lua_scripts/DSMLIB/readme.md b/Lua_scripts/DSMLIB/readme.md index ba05694..ceda29c 100644 --- a/Lua_scripts/DSMLIB/readme.md +++ b/Lua_scripts/DSMLIB/readme.md @@ -27,7 +27,6 @@ Please report of you have test it with other receivers to update the documentati If you get `"Unable to Load menu lines"` when trying to navidate to a menu, could be that the code needs to be specially adapter to mandle that menu in a different way than others. We did that HACK for AR631/AR637 for the `Initial Setup` and `Initial Safe Setup` menus. Before starting the script again, the problem shouls show at the log. Usually not been able to process some `Unknown_0x5` lines who has not been fully reversed engineered (you can share the logs with us to try to understand what is going on. - # Flight mode/Gain channels I ran into a case where trying to set Aux2 or Aux3 for flight mode, but the RX was correcting it to Aux1.. the RX only was allowing Gear or Aux1 (AR631/AR637). @@ -138,7 +137,6 @@ If you go to the logs, you can see that the RX was correcting the value: - --- # Version 0.5