parent
487acd62de
commit
c9552f29bb
|
@ -9,4 +9,21 @@
|
|||
|
||||
TEST(scheduler, dwellIssue796) {
|
||||
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð, IM_SEQUENTIAL);
|
||||
|
||||
eth.fireTriggerEvents2(4 /* count */ , 600 /* ms */);
|
||||
|
||||
// check if the mode is changed
|
||||
ASSERT_EQ(CRANKING, engine->rpmCalculator.getState());
|
||||
// due to isFasterEngineSpinUp=true, we should have already detected RPM!
|
||||
ASSERT_EQ( 100, GET_RPM()) << "spinning-RPM#1";
|
||||
ASSERT_EQ(300000, ENGINE(rpmCalculator.oneDegreeUs) * 180);
|
||||
|
||||
eth.fireRise(601);
|
||||
eth.fireFall(600);
|
||||
ASSERT_NEAR( 99, GET_RPM(), EPS3D) << "spinning-RPM#2";
|
||||
ASSERT_EQ(303030, (int)(ENGINE(rpmCalculator.oneDegreeUs) * 180));
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,7 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
|||
|
||||
ASSERT_EQ(IM_INDIVIDUAL_COILS, getCurrentIgnitionMode(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
|
||||
eth.moveTimeForwardMs(1000 /*ms*/);
|
||||
eth.firePrimaryTriggerRise();
|
||||
eth.fireRise(1000 /*ms*/);
|
||||
|
||||
// check if it's true
|
||||
ASSERT_EQ(IM_SEQUENTIAL, engine->getCurrentInjectionMode(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// This lets us inspect private state from unit tests
|
||||
#define private public
|
||||
|
||||
#define EPS0D 1
|
||||
#define EPS1D 0.1
|
||||
#define EPS2D 0.01
|
||||
#define EPS3D 0.001
|
||||
|
|
Loading…
Reference in New Issue