From a14059b90b81545b5589a03e3c105a1f810f8c47 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Mon, 14 Oct 2019 09:06:04 +0200 Subject: [PATCH 1/2] Handle NEXT_PAGE / PREV_PAGE only in non-telemetry scripts --- src/SCRIPTS/BF/ui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SCRIPTS/BF/ui.lua b/src/SCRIPTS/BF/ui.lua index 1f6b9800..d1e2a116 100644 --- a/src/SCRIPTS/BF/ui.lua +++ b/src/SCRIPTS/BF/ui.lua @@ -337,10 +337,10 @@ function run_ui(event) end -- normal page viewing elseif currentState <= pageStatus.display then - if event == EVT_VIRTUAL_PREV_PAGE then + if not isTelemetryScript and event == EVT_VIRTUAL_PREV_PAGE then incPage(-1) killEvents(event) -- X10/T16 issue: pageUp is a long press - elseif event == EVT_VIRTUAL_NEXT_PAGE or event == EVT_VIRTUAL_MENU then + elseif (not isTelemetryScript and event == EVT_VIRTUAL_NEXT_PAGE) or (isTelemetryScript and event == EVT_VIRTUAL_MENU) then incPage(1) elseif event == EVT_VIRTUAL_PREV or event == EVT_VIRTUAL_PREV_REPT then incLine(-1) From 048bdf19c7236ddedfedcc031d9fa4bbfcf77cfc Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Mon, 14 Oct 2019 09:06:50 +0200 Subject: [PATCH 2/2] Discard duplicated replies once the first reply has been received --- src/SCRIPTS/BF/MSP/common.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SCRIPTS/BF/MSP/common.lua b/src/SCRIPTS/BF/MSP/common.lua index 21c22572..d50b3ba0 100644 --- a/src/SCRIPTS/BF/MSP/common.lua +++ b/src/SCRIPTS/BF/MSP/common.lua @@ -129,6 +129,7 @@ function mspPollReply() while true do ret = protocol.mspPoll() if type(ret) == "table" then + mspLastReq = 0 return mspRxReq, ret else break