use ign load for ign

This commit is contained in:
Matthew Kennedy 2020-07-20 23:11:48 -07:00
parent c6d2a856dd
commit a3b29f9011
4 changed files with 12 additions and 12 deletions

View File

@ -297,7 +297,7 @@ static void showFuelInfo2(float rpm, float engineLoad) {
scheduleMsg(&logger2, "algo=%s/pump=%s", getEngine_load_mode_e(engineConfiguration->fuelAlgorithm),
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);

View File

@ -174,10 +174,6 @@ void EngineState::periodicFastCallback(DECLARE_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);
if (engineConfiguration->fuelAlgorithm == LM_SPEED_DENSITY) {
@ -203,10 +199,16 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
}
currentBaroCorrectedVE = baroCorrection * currentRawVE * PERCENT_DIV;
} else {
baseTableFuel = getBaseTableFuel(rpm, engineLoad);
baseTableFuel = getBaseTableFuel(rpm, getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE));
}
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
}

View File

@ -260,18 +260,16 @@ floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
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)) {
return 0; // error already reported
}
float engineLoad = getFuelingLoad(PASS_ENGINE_PARAMETER_SIGNATURE);
if (cisnan(engineLoad)) {
if (cisnan(load)) {
return 0; // error already reported
}
angle_t value = fuelPhaseMap.getValue(rpm, engineLoad);
angle_t value = fuelPhaseMap.getValue(rpm, load);
if (cisnan(value)) {
// we could be here while resetting configuration for example

View File

@ -27,7 +27,7 @@ AirmassResult getRealMafAirmass(float airMass, int rpm DECLARE_ENGINE_PARAMETER_
floatms_t getBaseTableFuel(int rpm, float engineLoad);
float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);
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);
floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_SUFFIX);
float getCltFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE);