diff --git a/firmware/controllers/lua/lua_lib.h b/firmware/controllers/lua/lua_lib.h index 7b0545095c..951f712d4b 100644 --- a/firmware/controllers/lua/lua_lib.h +++ b/firmware/controllers/lua/lua_lib.h @@ -57,9 +57,10 @@ function arrayToString(arr) \ while arr[index] ~= nil do \ str = str..\" \"..toHexString(math.floor(arr[index])) \ index = index + 1\ - end\ - return str\ -end\ + end \ + return str \ +end \ + \ \ " diff --git a/unit_tests/tests/lua/test_lua_kia.cpp b/unit_tests/tests/lua/test_lua_kia.cpp index 0b992c8e75..597d2c4635 100644 --- a/unit_tests/tests/lua/test_lua_kia.cpp +++ b/unit_tests/tests/lua/test_lua_kia.cpp @@ -20,7 +20,7 @@ TEST(LuaKia, packRpm) { rpm = 990 function testFunc() canEngine = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - setTwoBytes(canEngine, 2, 4 * rpm) + setTwoBytesLsb(canEngine, 2, 4 * rpm) print(arrayToString(canEngine)) expected = { 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x00, 0x00 } diff --git a/unit_tests/tests/lua/test_lua_vag.cpp b/unit_tests/tests/lua/test_lua_vag.cpp index 00306be301..b31e09ca4c 100644 --- a/unit_tests/tests/lua/test_lua_vag.cpp +++ b/unit_tests/tests/lua/test_lua_vag.cpp @@ -46,7 +46,7 @@ TEST(LuaVag, packMotor1) { canMotor1 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } canMotor1[2] = engineTorque / 0.39 - setTwoBytes(canMotor1, 2, rpm / 0.25) + setTwoBytesLsb(canMotor1, 2, rpm / 0.25) canMotor1[5] = innerTorqWithoutExt / 0.4 canMotor1[6] = tps / 0.4 canMotor1[7] = torqueLoss / 0.39