From 3d50b2015580834a66fb2c83a5dcc6c7f889f467 Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 25 Aug 2022 19:26:18 -0400 Subject: [PATCH] B6 progress --- unit_tests/tests/lua/test_lua_vag.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/unit_tests/tests/lua/test_lua_vag.cpp b/unit_tests/tests/lua/test_lua_vag.cpp index ee21b3672b..15c01374b7 100644 --- a/unit_tests/tests/lua/test_lua_vag.cpp +++ b/unit_tests/tests/lua/test_lua_vag.cpp @@ -62,6 +62,17 @@ TEST(LuaVag, unpackMotor1_rpm) { EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(realdata).value_or(0), 1698.5); } +TEST(LuaVag, unpackMotor1_inner_torq) { + const char* realdata = GET_BIT_RANGE_LSB realMotor1Packet R"( + function testFunc() + innerTorqWithoutExt = getBitRange(data, 32, 8) * 0.4 + return innerTorqWithoutExt + end + )"; + + EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(realdata).value_or(0), 21.6); +} + TEST(LuaVag, unpackMotor1_tps) { const char* realdata = GET_BIT_RANGE_LSB realMotor1Packet R"( function testFunc()