Skip to content

Commit 7a845bc

Browse files
committed
Do not send MSP command if previous reply didn't arrive yet
1 parent 84763a2 commit 7a845bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SCRIPTS/BF/features_info.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ local isOsdSDRead = false
88

99
local lastRunTS = 0
1010
local INTERVAL = 100
11+
local isInFlight = false
1112

1213
local returnTable = {
1314
f = nil,
1415
t = "",
1516
}
1617

1718
local function processMspReply(cmd, payload, err)
19+
isInFlight = false
1820
local isOkay = not err
1921
if cmd == MSP_GPS_CONFIG then
2022
isGpsRead = true
@@ -45,8 +47,9 @@ local function updateFeatures()
4547
cmd = MSP_OSD_CONFIG
4648
returnTable.t = "Checking OSD (SD)..."
4749
end
48-
if cmd then
50+
if cmd and not isInFlight then
4951
protocol.mspRead(cmd)
52+
isInFlight = true
5053
end
5154
end
5255
mspProcessTxQ()

0 commit comments

Comments
 (0)