This commit is contained in:
Andrey 2022-09-09 14:04:22 -04:00
parent ea7413a2a4
commit cbb42b68d1
1 changed files with 14 additions and 1 deletions

View File

@ -27,7 +27,6 @@ TEST(LuaE38, rpm) {
EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(script).value_or(0), 2629.5);
}
TEST(LuaE38, tps) {
const char* script = TWO_BYTES_MSB ECMEngineStatus R"(
@ -38,3 +37,17 @@ TEST(LuaE38, tps) {
)";
EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(script).value_or(0), 5.881);
}
#define ECMEngineCoolantTemp "\ndata = { 0x00, 0xCA, 0x69, 0x3F, 0x6A, 0x00, 0x00, 0x00}\n "
TEST(LuaE38, clt) {
EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(TWO_BYTES_MSB ECMEngineCoolantTemp R"(
function testFunc()
clt = data[3] -40
return clt
end
)"
).value_or(0), 65);
}