miata vvt trigger decoding is broken #1145
This commit is contained in:
parent
9790052596
commit
243a532f84
|
@ -21,22 +21,39 @@ TEST(engine, testSymmetricalCrank) {
|
||||||
// this test is not about isFasterEngineSpinUpEnabled so let's disable it to simplify things
|
// this test is not about isFasterEngineSpinUpEnabled so let's disable it to simplify things
|
||||||
CONFIG(isFasterEngineSpinUpEnabled) = false;
|
CONFIG(isFasterEngineSpinUpEnabled) = false;
|
||||||
|
|
||||||
float x = 0.02;
|
|
||||||
|
ASSERT_EQ(FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR, engine->getOperationMode(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
|
|
||||||
|
float mult = 0.02;
|
||||||
|
|
||||||
ASSERT_EQ( 0, GET_RPM()) << "RPM#0";
|
ASSERT_EQ( 0, GET_RPM()) << "RPM#0";
|
||||||
|
|
||||||
for (int i = 0; i < 8 ; i++) {
|
postFourEvents(ð, mult);
|
||||||
postFourEvents(ð, x);
|
ASSERT_EQ( 0, GET_RPM()) << "RPM#0";
|
||||||
|
|
||||||
|
eth.fireFall(mult * 384);
|
||||||
|
eth.fireRise(mult * 16);
|
||||||
|
eth.fireFall(mult * 304);
|
||||||
|
ASSERT_FALSE(engine->triggerCentral.triggerState.shaft_is_synchronized);
|
||||||
|
eth.fireRise(mult * 16);
|
||||||
|
ASSERT_TRUE(engine->triggerCentral.triggerState.shaft_is_synchronized);
|
||||||
|
|
||||||
|
ASSERT_EQ( 0, GET_RPM()) << "RPM#0";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < 6 ; i++) {
|
||||||
|
postFourEvents(ð, mult);
|
||||||
ASSERT_EQ( 0, GET_RPM()) << "RPM#0";
|
ASSERT_EQ( 0, GET_RPM()) << "RPM#0";
|
||||||
}
|
}
|
||||||
|
|
||||||
x = 0.1;
|
mult = 0.1;
|
||||||
postFourEvents(ð, x);
|
postFourEvents(ð, mult);
|
||||||
ASSERT_EQ( 1041, GET_RPM()) << "RPM#11";
|
ASSERT_EQ( 1041, GET_RPM()) << "RPM#11";
|
||||||
|
|
||||||
postFourEvents(ð, x);
|
postFourEvents(ð, mult);
|
||||||
ASSERT_EQ( 1041, GET_RPM()) << "RPM#11";
|
ASSERT_EQ( 1041, GET_RPM()) << "RPM#11";
|
||||||
|
|
||||||
postFourEvents(ð, x);
|
postFourEvents(ð, mult);
|
||||||
ASSERT_EQ( 1041, GET_RPM()) << "RPM#11";
|
ASSERT_EQ( 1041, GET_RPM()) << "RPM#11";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue