parent
ed2b84ca4c
commit
0ebe1c0207
|
@ -521,7 +521,7 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEventIndex D
|
||||||
|
|
||||||
// Check if the engine is not stopped or cylinder cleanup is activated
|
// Check if the engine is not stopped or cylinder cleanup is activated
|
||||||
static bool isPrimeInjectionPulseSkipped(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static bool isPrimeInjectionPulseSkipped(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
if (engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE))
|
if (!engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE))
|
||||||
return true;
|
return true;
|
||||||
return CONFIG(isCylinderCleanupEnabled) && (getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) > CLEANUP_MODE_TPS);
|
return CONFIG(isCylinderCleanupEnabled) && (getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) > CLEANUP_MODE_TPS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,21 @@ void testStartOfCrankingPrimingPulse() {
|
||||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||||
assertEqualsM("RPM=0", 0, engine->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE));
|
assertEqualsM("RPM=0", 0, engine->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
|
|
||||||
|
// this -70 value comes from CLT error handling code
|
||||||
|
assertEqualsM("CLT#1", 70, engine->sensors.clt);
|
||||||
|
|
||||||
|
// we need below freezing temperature to get prime fuel
|
||||||
|
// todo: less cruel CLT value assignment which would survive 'updateSlowSensors'
|
||||||
|
engine->sensors.clt = -10;
|
||||||
|
// this is needed to update injectorLag
|
||||||
|
// engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
// assertEqualsM("CLT#2", -10, engine->sensors.clt);
|
||||||
|
|
||||||
|
|
||||||
// prod code invokes this on ECU start, here we have to mimic this behavior
|
// prod code invokes this on ECU start, here we have to mimic this behavior
|
||||||
startPrimeInjectionPulse(PASS_ENGINE_PARAMETER_SIGNATURE);
|
startPrimeInjectionPulse(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
||||||
assertEqualsM("prime fuel", 0, schedulingQueue.size());
|
assertEqualsM("prime fuel", 1, schedulingQueue.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue