don't rely on periodicFastCallback
This commit is contained in:
parent
8b97b37a24
commit
795da6ea43
|
@ -740,7 +740,7 @@ void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
|||
|
||||
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
ASSERT_FLOAT_EQ(12.5, engine->injectionDuration) << "fuel#2_0";
|
||||
engine->injectionDuration = 12.5f;
|
||||
assertEqualsM("duty for maf=3", 62.5, getInjectorDutyCycle(GET_RPM() PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
|
||||
ASSERT_EQ( 4, engine->executor.size()) << "qs#1";
|
||||
|
@ -799,8 +799,6 @@ void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
|||
/**
|
||||
* one more revolution
|
||||
*/
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
|
||||
t = &ENGINE(injectionEvents);
|
||||
|
||||
|
@ -875,7 +873,7 @@ void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
|||
|
||||
eth.firePrimaryTriggerRise();
|
||||
ASSERT_EQ( 5, engine->executor.size()) << "Queue.size#03";
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
eth.assertInjectorUpEvent("07@0", 0, MS2US(7.5), 1);
|
||||
eth.assertInjectorDownEvent("07@1", 1, MS2US(10), 0);
|
||||
eth.assertInjectorUpEvent("07@2", 2, MS2US(17.5), 0);
|
||||
|
@ -897,18 +895,13 @@ void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
|||
assertInjectionEvent("#2#", &t->elements[2], 0, 1, 315);
|
||||
assertInjectionEvent("#3#", &t->elements[3], 1, 0, 45 + 90);
|
||||
|
||||
setArray(fuelMap.pointers[engineLoadIndex], FUEL_RPM_COUNT, 35);
|
||||
setArray(fuelMap.pointers[engineLoadIndex + 1], FUEL_RPM_COUNT, 35);
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
assertEqualsM("fuel#3", 17.5, engine->injectionDuration);
|
||||
engine->injectionDuration = 17.5;
|
||||
// duty cycle above 75% is a special use-case because 'special' fuel event overlappes the next normal event in batch mode
|
||||
assertEqualsM("duty for maf=3", 87.5, getInjectorDutyCycle(GET_RPM() PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
|
||||
|
||||
assertInjectionEvent("#03", &t->elements[0], 0, 0, 315);
|
||||
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
|
||||
ASSERT_EQ( 1, enginePins.injectors[0].currentLogicValue) << "inj#0";
|
||||
|
||||
|
@ -923,9 +916,6 @@ void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
|||
|
||||
|
||||
eth.executeActions();
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
|
||||
eth.fireRise(20);
|
||||
ASSERT_EQ( 7, engine->executor.size()) << "Queue.size#05";
|
||||
eth.executeActions();
|
||||
|
@ -938,8 +928,6 @@ void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
|||
eth.executeActions();
|
||||
eth.firePrimaryTriggerRise();
|
||||
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
t = &ENGINE(injectionEvents);
|
||||
|
||||
assertInjectionEvent("#00", &t->elements[0], 0, 0, 225); // 87.5 duty cycle
|
||||
|
@ -960,12 +948,6 @@ void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
|||
//// assertInjectorDownEvent("8@8", 8, MS2US(45), 1);
|
||||
//// assertInjectorDownEvent("8@9", 9, MS2US(55), 0);
|
||||
|
||||
eth.executeActions();
|
||||
|
||||
engine->mockMapValue = 0;
|
||||
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_10;
|
||||
engine->engineState.mockAdcState.setMockVoltage(EFI_ADC_10, 0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ( 1, unitTestWarningCodeState.recentWarnings.getCount()) << "warningCounter#testFuelSchedulerBug299smallAndMedium";
|
||||
ASSERT_EQ(CUSTOM_OBD_SKIPPED_FUEL, unitTestWarningCodeState.recentWarnings.get(0));
|
||||
}
|
||||
|
@ -1072,7 +1054,7 @@ TEST(big, testFuelSchedulerBug299smallAndLarge) {
|
|||
setArray(fuelMap.pointers[engineLoadIndex + 1], FUEL_RPM_COUNT, 35);
|
||||
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
ASSERT_FLOAT_EQ(17.5, engine->injectionDuration) << "Lfuel#2_1";
|
||||
engine->injectionDuration = 17.5f;
|
||||
assertEqualsM("Lduty for maf=3", 87.5, getInjectorDutyCycle(GET_RPM() PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
|
||||
|
||||
|
@ -1136,7 +1118,7 @@ TEST(big, testFuelSchedulerBug299smallAndLarge) {
|
|||
setArray(fuelMap.pointers[engineLoadIndex + 1], FUEL_RPM_COUNT, 4);
|
||||
|
||||
engine->periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
ASSERT_EQ( 2, engine->injectionDuration) << "Lfuel#4";
|
||||
engine->injectionDuration = 2.0f;
|
||||
ASSERT_EQ( 10, getInjectorDutyCycle(GET_RPM() PASS_ENGINE_PARAMETER_SUFFIX)) << "Lduty for maf=3";
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue