two bugs love to cancel each other

This commit is contained in:
rusefillc 2022-08-25 23:55:42 -04:00
parent c0391b16e4
commit 1ea6535b83
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
\
local index = 1 \
while data1[index] ~= nil do \
if data1[index] ~= data1[index] then \
if data1[index] ~= data2[index] then \
return -1 - index \
end \
index = index + 1 \

View File

@ -29,7 +29,7 @@ TEST(LuaVag, packMotor1) {
data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
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)
return equals(data, expected)
end