From fcc4d194307179f6a9541a52d8b7b871eb2aa050 Mon Sep 17 00:00:00 2001 From: Frankie Arzu <32604366+frankiearzu@users.noreply.github.com> Date: Thu, 17 Nov 2022 10:50:36 -0600 Subject: [PATCH] Frankie dsm fwrd prg enhancements (#755) * #751 DSM Enhancements #751 DSM Forward Programming Enhancements (New GUI, etc) * Make both work on EdgeTx and OpenTX * #751 Turn OFF simulation by default Distribution code with RX simulation OFF Simulation should be only for Development * #751 Update Readme Documentation Updated the Readme.txt documentation and removed compiled luac file that was check in by mistake Co-authored-by: pascallanger --- Lua_scripts/DSM FwdPrg_05_BW.lua | 2 +- Lua_scripts/DSM FwdPrg_05_Color.lua | 4 ++-- Lua_scripts/DSMLIB/readme.txt | 11 ++++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Lua_scripts/DSM FwdPrg_05_BW.lua b/Lua_scripts/DSM FwdPrg_05_BW.lua index 357ba41..3bbfb9b 100644 --- a/Lua_scripts/DSM FwdPrg_05_BW.lua +++ b/Lua_scripts/DSM FwdPrg_05_BW.lua @@ -17,7 +17,7 @@ local toolName = "TNS|DSM Forward Prog v0.5 (Text B&W) |TNE" ---- # # ---- ######################################################################### -local SIMULATION_ON = true -- FALSE: use real communication to DSM RX (DEFAULT), TRUE: use a simulated version of RX +local SIMULATION_ON = false -- FALSE: use real communication to DSM RX (DEFAULT), TRUE: use a simulated version of RX local DEBUG_ON = 1 -- 0=NO DEBUG, 1=HIGH LEVEL 2=LOW LEVEL (Debug logged into the /LOGS/dsm.log) local DEBUG_ON_LCD = false -- Interactive Information on LCD of Menu data from RX diff --git a/Lua_scripts/DSM FwdPrg_05_Color.lua b/Lua_scripts/DSM FwdPrg_05_Color.lua index ff2c824..f94ff3b 100644 --- a/Lua_scripts/DSM FwdPrg_05_Color.lua +++ b/Lua_scripts/DSM FwdPrg_05_Color.lua @@ -18,7 +18,7 @@ local VERSION = "v0.5" ---- # # ---- ######################################################################### -local SIMULATION_ON = true -- FALSE: use real communication to DSM RX (DEFAULT), TRUE: use a simulated version of RX +local SIMULATION_ON = false -- FALSE: use real communication to DSM RX (DEFAULT), TRUE: use a simulated version of RX local DEBUG_ON = 1 -- 0=NO DEBUG, 1=HIGH LEVEL 2=LOW LEVEL (Debug logged into the /LOGS/dsm.log) local DEBUG_ON_LCD = false -- Interactive Information on LCD of Menu data from RX local USE_SPECKTRUM_COLORS = true -- true: Use spectrum colors, false: use theme colors (default on OpenTX) @@ -567,7 +567,7 @@ local function init_colors() -- LINE SELECTED LCD_SELECTED_COLOR = WHITE LCD_SELECTED_BGCOLOR = ORANGE - LCD_EDIT_BGCOLOR = WARNING_COLOR + LCD_EDIT_BGCOLOR = RED -- NORMAL TEXT LCD_NORMAL_COLOR = BLACK LCD_DISABLE_COLOR = LIGHTGREY diff --git a/Lua_scripts/DSMLIB/readme.txt b/Lua_scripts/DSMLIB/readme.txt index a2bc279..5b4bf6b 100644 --- a/Lua_scripts/DSMLIB/readme.txt +++ b/Lua_scripts/DSMLIB/readme.txt @@ -25,13 +25,22 @@ Version 0.5 and see the exchange of data between the RX/TX - Created a black/white version with only Key/Roller Inputs (OTX) - Created a nicer GUI for EdgeTX touchscreen color Radios +- RX simulation for GUI development: turn on SIMULATION_ON=true in the beginning of the lua file + + +Some settings that can change (top of Lua file): + SIMULATION_ON = false -- FALSE: use real communication to DSM RX (DEFAULT), TRUE: use a simulated version of RX + DEBUG_ON = 1 -- 0=NO DEBUG, 1=HIGH LEVEL 2=LOW LEVEL (Debug logged into the /LOGS/dsm_log.txt) + DEBUG_ON_LCD = false -- Interactive Information on LCD of Menu data from RX + USE_SPECKTRUM_COLORS = true -- true: Use spectrum colors, false: use theme colors (default on OpenTX) + Known Problems: 1. When trying to Factory Reset an RX, even that navigation to menus seems OK, it did not reset. Maybe another message needs to be sent to RX when reaching that page 2. When initially setting a new RX, there is a point where a menu navigates to MenuID=0x0001, this seems like a special Save/Restart type of menu.. but it does not reset the RX. maybe another meesage needs to be send -3. Some Menu List line types (LINE_TYPE.LIST_MENU1), the range (min/max) seems to be incorrect, but cannot see in the data how to fix it +3. Some Menu List line types (LINE_TYPE.LIST_MENU1 or "L_m1" in logs), the range (min/max) seems to be incorrect, but cannot see in the data how to fix it Some of the valid values are not even sequential, very spread apart. There has to be a list of valid options somewhere (in RX or config for each field). 4. The RX return unknow lines when requesting the Lines for a menu. Realy don't understand what they are for. in some menus, seems to stay stuck in the same return line or no response to the request, making the RX reset/close the connection.