only:untrimmedInjectionMass is better
This commit is contained in:
parent
3e85ac0faf
commit
ab4e11f865
|
@ -138,11 +138,11 @@ void EngineState::periodicFastCallback() {
|
|||
auto tps = Sensor::get(SensorType::Tps1);
|
||||
updateTChargeK(rpm, tps.value_or(0));
|
||||
|
||||
float l_injectionMass = getInjectionMass(rpm) * engine->engineState.lua.fuelMult + engine->engineState.lua.fuelAdd;
|
||||
float untrimmedInjectionMass = getInjectionMass(rpm) * engine->engineState.lua.fuelMult + engine->engineState.lua.fuelAdd;
|
||||
auto clResult = fuelClosedLoopCorrection();
|
||||
|
||||
// Store the pre-wall wetting injection duration for scheduling purposes only, not the actual injection duration
|
||||
engine->engineState.injectionDuration = engine->module<InjectorModel>()->getInjectionDuration(l_injectionMass);
|
||||
engine->engineState.injectionDuration = engine->module<InjectorModel>()->getInjectionDuration(untrimmedInjectionMass);
|
||||
|
||||
float fuelLoad = getFuelingLoad();
|
||||
injectionOffset = getInjectionOffset(rpm, fuelLoad);
|
||||
|
@ -173,7 +173,7 @@ void EngineState::periodicFastCallback() {
|
|||
auto cylinderTrim = getCylinderFuelTrim(i, rpm, fuelLoad);
|
||||
|
||||
// Apply both per-bank and per-cylinder trims
|
||||
engine->engineState.injectionMass[i] = l_injectionMass * bankTrim * cylinderTrim;
|
||||
engine->engineState.injectionMass[i] = untrimmedInjectionMass * bankTrim * cylinderTrim;
|
||||
|
||||
timingAdvance[i] = correctedIgnitionAdvance + getCombinedCylinderIgnitionTrim(i, rpm, l_ignitionLoad);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue