[S6R] Delay is 500ms - Timeout set to 800ms
This commit is contained in:
@@ -95,14 +95,14 @@ local function redrawPage()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local counter = 0
|
local telemetryPopTimeout = 0
|
||||||
local function refreshNext()
|
local function refreshNext()
|
||||||
if refreshState == 0 then
|
if refreshState == 0 then
|
||||||
if refreshIndex < #fields then
|
if refreshIndex < #fields then
|
||||||
field = fields[refreshIndex + 1]
|
field = fields[refreshIndex + 1]
|
||||||
if telemetryPush(0x1A, 0x30, 0x0C30, field[3]) == true then
|
if telemetryPush(0x1A, 0x30, 0x0C30, field[3]) == true then
|
||||||
refreshState = 1
|
refreshState = 1
|
||||||
counter = 0
|
telemetryPopTimeout = getTime() + 80 -- normal delay is 500ms
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -123,10 +123,8 @@ local function refreshNext()
|
|||||||
fields[refreshIndex + 1][4] = value
|
fields[refreshIndex + 1][4] = value
|
||||||
refreshIndex = refreshIndex + 1
|
refreshIndex = refreshIndex + 1
|
||||||
refreshState = 0
|
refreshState = 0
|
||||||
elseif counter == 20 then
|
elseif getTime() > telemetryPopTimeout then
|
||||||
refreshState = 0
|
refreshState = 0
|
||||||
else
|
|
||||||
counter = counter + 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user