mirror of https://github.com/rusefi/rusefi-1.git
use ign load for ign
This commit is contained in:
parent
c6d2a856dd
commit
a3b29f9011
|
@ -297,7 +297,7 @@ static void showFuelInfo2(float rpm, float engineLoad) {
|
||||||
scheduleMsg(&logger2, "algo=%s/pump=%s", getEngine_load_mode_e(engineConfiguration->fuelAlgorithm),
|
scheduleMsg(&logger2, "algo=%s/pump=%s", getEngine_load_mode_e(engineConfiguration->fuelAlgorithm),
|
||||||
boolToString(enginePins.fuelPumpRelay.getLogicValue()));
|
boolToString(enginePins.fuelPumpRelay.getLogicValue()));
|
||||||
|
|
||||||
scheduleMsg(&logger2, "injection phase=%.2f/global fuel correction=%.2f", getInjectionOffset(rpm), engineConfiguration->globalFuelCorrection);
|
scheduleMsg(&logger2, "injection phase=%.2f/global fuel correction=%.2f", getInjectionOffset(rpm, getFuelingLoad()), engineConfiguration->globalFuelCorrection);
|
||||||
|
|
||||||
scheduleMsg(&logger2, "baro correction=%.2f", engine->engineState.baroCorrection);
|
scheduleMsg(&logger2, "baro correction=%.2f", engine->engineState.baroCorrection);
|
||||||
|
|
||||||
|
|
|
@ -174,10 +174,6 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
baroCorrection = getBaroCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
|
baroCorrection = getBaroCorrection(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
injectionOffset = getInjectionOffset(rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
|
||||||
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE);
|
|
||||||
timingAdvance = getAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER_SUFFIX);
|
|
||||||
|
|
||||||
multispark.count = getMultiSparkCount(rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
multispark.count = getMultiSparkCount(rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
if (engineConfiguration->fuelAlgorithm == LM_SPEED_DENSITY) {
|
if (engineConfiguration->fuelAlgorithm == LM_SPEED_DENSITY) {
|
||||||
|
@ -203,10 +199,16 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
}
|
}
|
||||||
currentBaroCorrectedVE = baroCorrection * currentRawVE * PERCENT_DIV;
|
currentBaroCorrectedVE = baroCorrection * currentRawVE * PERCENT_DIV;
|
||||||
} else {
|
} else {
|
||||||
baseTableFuel = getBaseTableFuel(rpm, engineLoad);
|
baseTableFuel = getBaseTableFuel(rpm, getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
ENGINE(injectionDuration) = getInjectionDuration(rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
ENGINE(injectionDuration) = getInjectionDuration(rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
float fuelLoad = getFuelingLoad(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
injectionOffset = getInjectionOffset(rpm, fuelLoad PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
float ignitionLoad = getIgnitionLoad(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
timingAdvance = getAdvance(rpm, ignitionLoad PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
#endif // EFI_ENGINE_CONTROL
|
#endif // EFI_ENGINE_CONTROL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,18 +260,16 @@ floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
return tpsAccelEnrich + baseFuel;
|
return tpsAccelEnrich + baseFuel;
|
||||||
}
|
}
|
||||||
|
|
||||||
angle_t getInjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
angle_t getInjectionOffset(float rpm, float load DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
if (cisnan(rpm)) {
|
if (cisnan(rpm)) {
|
||||||
return 0; // error already reported
|
return 0; // error already reported
|
||||||
}
|
}
|
||||||
|
|
||||||
float engineLoad = getFuelingLoad(PASS_ENGINE_PARAMETER_SIGNATURE);
|
if (cisnan(load)) {
|
||||||
|
|
||||||
if (cisnan(engineLoad)) {
|
|
||||||
return 0; // error already reported
|
return 0; // error already reported
|
||||||
}
|
}
|
||||||
|
|
||||||
angle_t value = fuelPhaseMap.getValue(rpm, engineLoad);
|
angle_t value = fuelPhaseMap.getValue(rpm, load);
|
||||||
|
|
||||||
if (cisnan(value)) {
|
if (cisnan(value)) {
|
||||||
// we could be here while resetting configuration for example
|
// we could be here while resetting configuration for example
|
||||||
|
|
|
@ -27,7 +27,7 @@ AirmassResult getRealMafAirmass(float airMass, int rpm DECLARE_ENGINE_PARAMETER_
|
||||||
floatms_t getBaseTableFuel(int rpm, float engineLoad);
|
floatms_t getBaseTableFuel(int rpm, float engineLoad);
|
||||||
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
angle_t getInjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
angle_t getInjectionOffset(float rpm, float load DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
float getIatFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
float getIatFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_SUFFIX);
|
floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
float getCltFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
float getCltFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
Loading…
Reference in New Issue