Change the way to detect that the files exist. now works on both ETX and OTX
This commit is contained in:
Frankie Arzu 2022-11-26 10:23:00 -06:00
parent 25d77b31be
commit d97c2fc85c
4 changed files with 13 additions and 15 deletions

View File

@ -23,17 +23,12 @@ local DEBUG_ON_LCD = false -- Interactive Information on LCD of Menu data from
local DSMLIB_PATH = "/SCRIPTS/TOOLS/DSMLIB/"
local dirExist = fstat(DSMLIB_PATH.."DsmFwPrgLib.lua")
if (dirExist==nil) then error("Make sure "..DSMLIB_PATH.." contains DsmFwPrgLib.lua") end
dirExist = fstat(DSMLIB_PATH.."DsmFwPrgSIMLib.lua")
if (dirExist==nil) then error("Make sure "..DSMLIB_PATH.." contains DsmFwPrgSIMLib.lua") end
local dsmLib
if (SIMULATION_ON) then
-- library with SIMILATION VERSION. Works really well in Companion for GUI development
dsmLib = loadScript(DSMLIB_PATH .. "DsmFwPrgSIMLib.lua")(DEBUG_ON)
dsmLib = assert(loadScript(DSMLIB_PATH.."DsmFwPrgSIMLib.lua"), "Not-Found: DSMLIB/DsmFwPrgSIMLib.lua")(DEBUG_ON)
else
dsmLib = loadScript(DSMLIB_PATH .. "DsmFwPrgLib.lua")(DEBUG_ON)
dsmLib = assert(loadScript(DSMLIB_PATH.."DsmFwPrgLib.lua"),"Not-Found: DSMLIB/DsmFwPrgLib.lua")(DEBUG_ON)
end
local PHASE = dsmLib.PHASE

View File

@ -25,20 +25,16 @@ local USE_SPECKTRUM_COLORS = true -- true: Use spectrum colors, false: use theme
local DSMLIB_PATH = "/SCRIPTS/TOOLS/DSMLIB/"
local IMAGE_PATH = DSMLIB_PATH .. "img/"
local dirExist = fstat(DSMLIB_PATH.."DsmFwPrgLib.lua")
if (dirExist==nil) then error("Make sure "..DSMLIB_PATH.." contains DsmFwPrgLib.lua") end
dirExist = fstat(DSMLIB_PATH.."DsmFwPrgSIMLib.lua")
if (dirExist==nil) then error("Make sure "..DSMLIB_PATH.." contains DsmFwPrgSIMLib.lua") end
local dsmLib
if (SIMULATION_ON) then
-- library with SIMILATION VERSION. Works really well in Companion for GUI development
dsmLib = loadScript(DSMLIB_PATH.."DsmFwPrgSIMLib.lua")(DEBUG_ON)
dsmLib = assert(loadScript(DSMLIB_PATH.."DsmFwPrgSIMLib.lua"), "Not-Found: DSMLIB/DsmFwPrgSIMLib.lua")(DEBUG_ON)
else
dsmLib = loadScript(DSMLIB_PATH.."DsmFwPrgLib.lua")(DEBUG_ON)
dsmLib = assert(loadScript(DSMLIB_PATH.."DsmFwPrgLib.lua"),"Not-Found: DSMLIB/DsmFwPrgLib.lua")(DEBUG_ON)
end
local PHASE = dsmLib.PHASE
local LINE_TYPE = dsmLib.LINE_TYPE
local DISP_ATTR = dsmLib.DISP_ATTR

View File

@ -27,7 +27,7 @@
local DEBUG_ON = ... -- Get DebugON from parameters
local dsmLib = loadScript("/SCRIPTS/TOOLS/DSMLIB/DsmFwPrgLib.lua")(DEBUG_ON)
local dsmLib = assert(loadScript("/SCRIPTS/TOOLS/DSMLIB/DsmFwPrgLib.lua"))(DEBUG_ON)
local PHASE = dsmLib.PHASE
local LINE_TYPE = dsmLib.LINE_TYPE

View File

@ -28,6 +28,12 @@ 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).
This is because the RX don't know that we are using more than 6 channels. To make the RX aware that there are other channels, while edditing the channel, you have to toggle the switch to excersist the channel, and now the RX will recognize it.
# Deployment
/SCRIPTS/TOOLS/DsmFwdPrg_05_BW.lua -- black/white text only radios
@ -132,6 +138,7 @@ If you go to the logs, you can see that the RX was correcting the value:
---
# Version 0.5