From 3d815e5d1b0a05275950c12a7f423da20852b32e Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Sat, 30 Apr 2016 19:41:37 +0200 Subject: [PATCH] [S6R] Delay is 500ms - Timeout set to 800ms --- radio/sdcard/taranis/TEMPLATES/S6R.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/radio/sdcard/taranis/TEMPLATES/S6R.lua b/radio/sdcard/taranis/TEMPLATES/S6R.lua index 035db1a3f..504a346e4 100644 --- a/radio/sdcard/taranis/TEMPLATES/S6R.lua +++ b/radio/sdcard/taranis/TEMPLATES/S6R.lua @@ -95,14 +95,14 @@ local function redrawPage() end end -local counter = 0 +local telemetryPopTimeout = 0 local function refreshNext() if refreshState == 0 then if refreshIndex < #fields then field = fields[refreshIndex + 1] if telemetryPush(0x1A, 0x30, 0x0C30, field[3]) == true then refreshState = 1 - counter = 0 + telemetryPopTimeout = getTime() + 80 -- normal delay is 500ms end end else @@ -123,10 +123,8 @@ local function refreshNext() fields[refreshIndex + 1][4] = value refreshIndex = refreshIndex + 1 refreshState = 0 - elseif counter == 20 then + elseif getTime() > telemetryPopTimeout then refreshState = 0 - else - counter = counter + 1 end end end