B6 progress
This commit is contained in:
parent
2ee07e643c
commit
764fc833d7
|
@ -6,7 +6,7 @@
|
|||
\
|
||||
local index = 1 \
|
||||
while data1[index] ~= nil do \
|
||||
if data1[index] ~= data2[index] then \
|
||||
if math.floor(data1[index]) ~= math.floor(data2[index]) then \
|
||||
return -1 - index \
|
||||
end \
|
||||
index = index + 1 \
|
||||
|
@ -39,7 +39,7 @@ function arrayToString(arr) \
|
|||
local str = \"\" \
|
||||
local index = 1 \
|
||||
while arr[index] ~= nil do \
|
||||
str = str..\" \"..toHexString(arr[index]) \
|
||||
str = str..\" \"..toHexString(math.floor(arr[index])) \
|
||||
index = index + 1 \
|
||||
end \
|
||||
return str \
|
||||
|
|
|
@ -38,11 +38,11 @@ TEST(LuaVag, packMotor1) {
|
|||
data[5] = innerTorqWithoutExt / 0.4
|
||||
data[6] = tps / 0.4
|
||||
data[7] = torqueLoss / 0.39
|
||||
data[8] = torqueLoss / 0.39
|
||||
data[8] = requestedTorque / 0.39
|
||||
|
||||
print(arrayToString(data))
|
||||
|
||||
expected = { 0x00, 0x27, 0xDC, 0x12, 0x36, 0x4F, 0x19, 0x19 }
|
||||
expected = { 0x00, 0x27, 0xDC, 0x12, 0x36, 0x4F, 0x19, 0x38 }
|
||||
-- print(data)
|
||||
return equals(data, expected)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue