Skip to content

Commit f8d58f6

Browse files
committed
Merge master elrs.lua changes
1 parent 1d51ceb commit f8d58f6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/lua/elrsV3.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
77
---- # #
88
---- #########################################################################
9-
local EXITVER = "-- EXIT (Lua r15) --"
9+
local EXITVER = "-- EXIT (Lua r16) --"
1010
local deviceId = 0xEE
1111
local handsetId = 0xEF
12-
local deviceName = "Loading..."
12+
local deviceName = nil
1313
local lineIndex = 1
1414
local pageOffset = 0
1515
local edit = nil
@@ -572,7 +572,7 @@ local function refreshNext(skipPush)
572572
elseif time > fieldTimeout and fields_count ~= 0 then
573573
if #loadQ > 0 then
574574
crossfireTelemetryPush(0x2C, { deviceId, handsetId, loadQ[#loadQ], fieldChunk })
575-
fieldTimeout = time + 500 -- 5s
575+
fieldTimeout = time + (deviceIsELRS_TX and 50 or 500) -- 0.5s for local / 5s for remote devices
576576
end
577577
end
578578

@@ -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

0 commit comments

Comments
 (0)