We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a6b28a commit a5a8706Copy full SHA for a5a8706
src/SCRIPTS/BF/MSP/common.lua
@@ -9,6 +9,7 @@ local mspRemoteSeq = 0
9
local mspRxBuf = {}
10
local mspRxIdx = 1
11
local mspRxCRC = 0
12
+local mspRxReq = 0
13
local mspStarted = false
14
local mspLastReq = 0
15
local mspTxBuf = {}
@@ -96,6 +97,7 @@ function mspReceivedReply(payload)
96
97
mspRxBuf = {}
98
mspRxSize = payload[idx]
99
mspRxCRC = bit32.bxor(mspRxSize,mspLastReq)
100
+ mspRxReq = mspLastReq
101
idx = idx + 1
102
mspStarted = true
103
elseif not mspStarted then
@@ -129,7 +131,7 @@ function mspPollReply()
129
131
while true do
130
132
ret = protocol.mspPoll()
133
if type(ret) == "table" then
- return mspLastReq, ret
134
+ return mspRxReq, ret
135
else
136
break
137
end
0 commit comments