#766 Change way of dectecting EdgeTX

Change way of detecting OTX in multiple versions: OTX 2.3.14 and 2.3.15
This commit is contained in:
Frankie Arzu 2022-11-26 18:19:27 -06:00
parent 8d7b472f0e
commit aab8ad20d7
3 changed files with 6 additions and 4 deletions

View File

@ -387,7 +387,9 @@ end
local function init_screen_pos() local function init_screen_pos()
-- osName in OpenTX is nil, otherwise is EDGETX -- osName in OpenTX is nil, otherwise is EDGETX
local ver, radio, maj, minor, rev, osname = getVersion() 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 if LCD_W == 480 then -- TX16
-- use defaults in the script header -- use defaults in the script header

View File

@ -574,7 +574,9 @@ end
local function init_colors() local function init_colors()
-- osName in OpenTX is nil, otherwise is EDGETX -- osName in OpenTX is nil, otherwise is EDGETX
local ver, radio, maj, minor, rev, osname = getVersion() 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 if (IS_EDGETX and USE_SPECKTRUM_COLORS) then
-- SPECKTRUM COLORS (only works on EDGETX) -- SPECKTRUM COLORS (only works on EDGETX)

View File

@ -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. 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 # 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). 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 # Version 0.5