diff --git a/Lua_scripts/DSM FwdPrg_05_BW.lua b/Lua_scripts/DSM FwdPrg_05_BW.lua index 9293e9f..527701a 100644 --- a/Lua_scripts/DSM FwdPrg_05_BW.lua +++ b/Lua_scripts/DSM FwdPrg_05_BW.lua @@ -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 diff --git a/Lua_scripts/DSM FwdPrg_05_Color.lua b/Lua_scripts/DSM FwdPrg_05_Color.lua index e541d9c..bb5a497 100644 --- a/Lua_scripts/DSM FwdPrg_05_Color.lua +++ b/Lua_scripts/DSM FwdPrg_05_Color.lua @@ -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 diff --git a/Lua_scripts/DSMLIB/DsmFwPrgSIMLib.lua b/Lua_scripts/DSMLIB/DsmFwPrgSIMLib.lua index adb465c..8a30c21 100644 --- a/Lua_scripts/DSMLIB/DsmFwPrgSIMLib.lua +++ b/Lua_scripts/DSMLIB/DsmFwPrgSIMLib.lua @@ -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 diff --git a/Lua_scripts/DSMLIB/readme.md b/Lua_scripts/DSMLIB/readme.md index c640887..ba05694 100644 --- a/Lua_scripts/DSMLIB/readme.md +++ b/Lua_scripts/DSMLIB/readme.md @@ -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