Skip to content

Commit aca1bcb

Browse files
committed
Include module type in loading message
1 parent a9f8286 commit aca1bcb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lua/elrsV3.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,10 @@ local function checkCrsfModule()
895895
for modIdx = 0, 1 do
896896
local mod = model.getModule(modIdx)
897897
if mod and (mod.Type == nil or mod.Type == 5) then
898-
-- CRSF found
898+
-- CRSF found, put module type in Loading message
899+
local modDescrip = (mod.Type == nil) and " awaiting" or (modIdx == 0) and " Internal" or " External"
900+
-- Prefix with "Lua rXXX" from between EXITVER parens
901+
deviceName = string.match(EXITVER, "%((.*)%)") .. modDescrip .. " TX..."
899902
checkCrsfModule = nil
900903
return 0
901904
end
@@ -932,8 +935,6 @@ local function init()
932935
setMock()
933936
setLCDvar = nil
934937
setMock = nil
935-
-- Extract the "Lua rXXX" from the parens
936-
deviceName = string.match(EXITVER, "%((.*)%)") .. " loading..."
937938
end
938939

939940
-- Main

0 commit comments

Comments
 (0)