something is not right here :(
This commit is contained in:
parent
358af4ff89
commit
6f0c0fcf68
|
@ -13,6 +13,11 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
||||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||||
// turn on FasterEngineSpinUp mode
|
// turn on FasterEngineSpinUp mode
|
||||||
engineConfiguration->bc.isFasterEngineSpinUpEnabled = true;
|
engineConfiguration->bc.isFasterEngineSpinUpEnabled = true;
|
||||||
|
|
||||||
|
|
||||||
|
// todo: it's depressing that this unit test does not survive a bit of idle time in the beginning
|
||||||
|
// todo: uncomment
|
||||||
|
//eth.moveTimeForwardMs(1000 /*ms*/);
|
||||||
eth.firePrimaryTriggerRise();
|
eth.firePrimaryTriggerRise();
|
||||||
|
|
||||||
// set ignition mode
|
// set ignition mode
|
||||||
|
@ -96,13 +101,23 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
||||||
eth.assertEvent5(&engine->executor, "inj end#3", 1, (void*)seTurnPinLow, timeStartUs, MS2US(60) + 27974 + 3000);
|
eth.assertEvent5(&engine->executor, "inj end#3", 1, (void*)seTurnPinLow, timeStartUs, MS2US(60) + 27974 + 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void doTestFasterEngineSpinningUp60_2(int startUpDelayMs, int expectedRpm) {
|
||||||
TEST(cranking, testFasterEngineSpinningUp60_2) {
|
|
||||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||||
// turn on FasterEngineSpinUp mode
|
// turn on FasterEngineSpinUp mode
|
||||||
engineConfiguration->bc.isFasterEngineSpinUpEnabled = true;
|
engineConfiguration->bc.isFasterEngineSpinUpEnabled = true;
|
||||||
|
|
||||||
setupSimpleTestEngineWithMaf(ð, IM_SEQUENTIAL, TT_TOOTHED_WHEEL_60_2);
|
setupSimpleTestEngineWithMaf(ð, IM_SEQUENTIAL, TT_TOOTHED_WHEEL_60_2);
|
||||||
|
eth.moveTimeForwardMs(startUpDelayMs);
|
||||||
|
|
||||||
eth.fireTriggerEvents2(30 /* count */, 1 /*ms*/);
|
eth.fireTriggerEvents2(30 /* count */, 1 /*ms*/);
|
||||||
|
eth.fireTriggerEvents2(1, 4);
|
||||||
|
EXPECT_EQ(expectedRpm, GET_RPM()) << "test RPM with " + std::to_string(startUpDelayMs) + " startUpDelayMs";
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(cranking, testFasterEngineSpinningUp60_2) {
|
||||||
|
// I do not get it. Startup delay is affecting instance RPM?
|
||||||
|
// todo: is this feature implementation issue or test framework issue?
|
||||||
|
doTestFasterEngineSpinningUp60_2(0, 220);
|
||||||
|
doTestFasterEngineSpinningUp60_2(100, 89);
|
||||||
|
doTestFasterEngineSpinningUp60_2(1000, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -690,10 +690,11 @@ static void assertInjectors(const char *msg, int value0, int value1) {
|
||||||
assertEqualsM4(msg, "inj#1", value1, enginePins.injectors[1].currentLogicValue);
|
assertEqualsM4(msg, "inj#1", value1, enginePins.injectors[1].currentLogicValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(big, testFuelSchedulerBug299smallAndMedium) {
|
void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
||||||
printf("*************************************************** testFuelSchedulerBug299 small to medium\r\n");
|
printf("*************************************************** testFuelSchedulerBug299 small to medium\r\n");
|
||||||
|
|
||||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||||
|
eth.moveTimeForwardMs(startUpDelayMs); // nice to know that same test works the same with different anount of idle time on start
|
||||||
setTestBug299(ð);
|
setTestBug299(ð);
|
||||||
|
|
||||||
FuelSchedule * t;
|
FuelSchedule * t;
|
||||||
|
@ -941,6 +942,11 @@ static void setInjectionMode(int value DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(big, testFuelSchedulerBug299smallAndMedium) {
|
||||||
|
doTestFuelSchedulerBug299smallAndMedium(0);
|
||||||
|
doTestFuelSchedulerBug299smallAndMedium(1000);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(big, testDifferentInjectionModes) {
|
TEST(big, testDifferentInjectionModes) {
|
||||||
printf("*************************************************** testDifferentInjectionModes\r\n");
|
printf("*************************************************** testDifferentInjectionModes\r\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue