Update B6-temp.md
This commit is contained in:
parent
c30d6fc62e
commit
d5eb58b64e
12
B6-temp.md
12
B6-temp.md
|
@ -8,6 +8,18 @@ MOTOR_6 = 0x488
|
|||
MOTOR_7 = 0x588
|
||||
|
||||
|
||||
xorChecksum(data, targetIndex)
|
||||
local index = 1
|
||||
local result = 0
|
||||
while data[index] ~= nil do
|
||||
if index ~= targetIndex then
|
||||
result = result ~ data[index]
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
function getBitRange(data, bitIndex, bitWidth)
|
||||
byteIndex = bitIndex >> 3
|
||||
shift = bitIndex - byteIndex * 8
|
||||
|
|
Loading…
Reference in New Issue