mirror of https://github.com/FOME-Tech/fome-fw.git
two bugs love to cancel each other
This commit is contained in:
parent
c0391b16e4
commit
1ea6535b83
|
@ -6,7 +6,7 @@
|
||||||
\
|
\
|
||||||
local index = 1 \
|
local index = 1 \
|
||||||
while data1[index] ~= nil do \
|
while data1[index] ~= nil do \
|
||||||
if data1[index] ~= data1[index] then \
|
if data1[index] ~= data2[index] then \
|
||||||
return -1 - index \
|
return -1 - index \
|
||||||
end \
|
end \
|
||||||
index = index + 1 \
|
index = index + 1 \
|
||||||
|
|
|
@ -29,7 +29,7 @@ TEST(LuaVag, packMotor1) {
|
||||||
data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
|
data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
|
||||||
|
|
||||||
setTwoBytes(data, 2, 4 * rpm)
|
setTwoBytes(data, 2, 4 * rpm)
|
||||||
expected = { 0x00, 0x00, 0xDF, 0x12, 0x00, 0x00, 0x00, 0x00 }
|
expected = { 0x00, 0x00, 0xDC, 0x12, 0x00, 0x00, 0x00, 0x00 }
|
||||||
-- print(data)
|
-- print(data)
|
||||||
return equals(data, expected)
|
return equals(data, expected)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue