refactoring: moving field
This commit is contained in:
parent
ccfe2a5d58
commit
d51511a15e
|
@ -330,12 +330,6 @@ public:
|
|||
TriggerCentral triggerCentral;
|
||||
#endif // EFI_SHAFT_POSITION_INPUT
|
||||
|
||||
/**
|
||||
* Each individual fuel injection duration for current engine cycle, without wall wetting
|
||||
* including everything including injector lag, both cranking and running
|
||||
* @see getInjectionDuration()
|
||||
*/
|
||||
floatms_t injectionDuration = 0;
|
||||
|
||||
// Per-injection fuel mass, including TPS accel enrich
|
||||
float injectionMass[MAX_CYLINDER_COUNT] = {0};
|
||||
|
|
|
@ -158,7 +158,7 @@ void EngineState::periodicFastCallback() {
|
|||
auto clResult = fuelClosedLoopCorrection();
|
||||
|
||||
// Store the pre-wall wetting injection duration for scheduling purposes only, not the actual injection duration
|
||||
engine->injectionDuration = engine->module<InjectorModel>()->getInjectionDuration(injectionMass);
|
||||
engine->engineState.injectionDuration = engine->module<InjectorModel>()->getInjectionDuration(injectionMass);
|
||||
|
||||
float fuelLoad = getFuelingLoad();
|
||||
injectionOffset = getInjectionOffset(rpm, fuelLoad);
|
||||
|
|
|
@ -61,6 +61,13 @@ public:
|
|||
*/
|
||||
floatms_t tpsAccelEnrich = 0;
|
||||
|
||||
/**
|
||||
* Each individual fuel injection duration for current engine cycle, without wall wetting
|
||||
* including everything including injector lag, both cranking and running
|
||||
* @see getInjectionDuration()
|
||||
*/
|
||||
floatms_t injectionDuration = 0;
|
||||
|
||||
angle_t injectionOffset = 0;
|
||||
|
||||
multispark_state multispark;
|
||||
|
|
|
@ -271,7 +271,7 @@ float getInjectionModeDurationMultiplier() {
|
|||
* @see getCoilDutyCycle
|
||||
*/
|
||||
percent_t getInjectorDutyCycle(int rpm) {
|
||||
floatms_t totalInjectiorAmountPerCycle = engine->injectionDuration * getNumberOfInjections(engineConfiguration->injectionMode);
|
||||
floatms_t totalInjectiorAmountPerCycle = engine->engineState.injectionDuration * getNumberOfInjections(engineConfiguration->injectionMode);
|
||||
floatms_t engineCycleDuration = getEngineCycleDuration(rpm);
|
||||
return 100 * totalInjectiorAmountPerCycle / engineCycleDuration;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ expected<float> InjectionEvent::computeInjectionAngle(int cylinderIndex) const {
|
|||
|
||||
// injection phase may be scheduled by injection end, so we need to step the angle back
|
||||
// for the duration of the injection
|
||||
angle_t injectionDurationAngle = getInjectionAngleCorrection(engine->injectionDuration, oneDegreeUs);
|
||||
angle_t injectionDurationAngle = getInjectionAngleCorrection(engine->engineState.injectionDuration, oneDegreeUs);
|
||||
|
||||
// User configured offset - degrees after TDC combustion
|
||||
floatus_t injectionOffset = engine->engineState.injectionOffset;
|
||||
|
|
Loading…
Reference in New Issue