After-start enrichment handling more similar to OEM (#5632)
* After-start enrichment handling more similar to OEM and other Standalone EFI systems * Corrections and tidying-up * Corrected small mistake in TunerStudio definition * Compatibility fixes * Readability fix --------- Co-authored-by: pchmura4 <>
This commit is contained in:
parent
4142b42714
commit
9252ecc3c0
|
@ -30,6 +30,7 @@ Release template (copy/paste this for new release):
|
|||
|
||||
### Breaking Changes
|
||||
- "acIdleRpmBump" renamed to "acIdleRpmTarget", and changed the way of RPM rise needed for proper A/C operation from added to absolute target #5628
|
||||
- After Cranking Enrichment changed from fixed value to table, it can help with some engines that want lots of fuel on cold, but don't run too well with big enrichment on hot
|
||||
|
||||
### Added
|
||||
- DAC with Lua #5601
|
||||
|
|
|
@ -139,7 +139,6 @@ void setBoardDefaultConfiguration() {
|
|||
setPPSCalibration(0.75, 4.45, 0.43, 2.20);
|
||||
|
||||
engineConfiguration->startUpFuelPumpDuration = 4;
|
||||
engineConfiguration->postCrankingFactor = 1.05;
|
||||
|
||||
setEtbPID(6.1350, 87.7182, 0.0702);
|
||||
|
||||
|
|
|
@ -889,7 +889,7 @@ void detectBoardType() {
|
|||
void fuelBenchMode() {
|
||||
engineConfiguration->cranking.rpm = 12000;
|
||||
setFlatInjectorLag(0);
|
||||
engineConfiguration->postCrankingFactor = 1;
|
||||
setTable(engineConfiguration->postCrankingFactor, 1.0f);
|
||||
setArrayValues(config->crankingFuelCoef, 1.0f);
|
||||
setArrayValues(config->crankingCycleCoef, 1.0f);
|
||||
setBodyControlUnit();
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include "honda_k_dbc.h"
|
||||
#include "table_helper.h"
|
||||
|
||||
#if HW_PROTEUS & EFI_PROD_CODE
|
||||
#include "proteus_meta.h"
|
||||
|
@ -42,8 +43,11 @@ void setHondaK() {
|
|||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
|
||||
engineConfiguration->crankingIACposition = 70;
|
||||
engineConfiguration->postCrankingFactor = 1.25;
|
||||
engineConfiguration->postCrankingDurationSec = 15;
|
||||
static const uint16_t defaultPostCrankinDurationBins[] = {
|
||||
0, 2, 4, 6, 8, 10, 12, 15
|
||||
};
|
||||
copyArray(engineConfiguration->postCrankingDurationBins, defaultPostCrankinDurationBins);
|
||||
setTable(engineConfiguration->postCrankingFactor, 1.25f);
|
||||
engineConfiguration->useRunningMathForCranking = true;
|
||||
|
||||
strcpy(engineConfiguration->engineMake, ENGINE_MAKE_HONDA);
|
||||
|
|
|
@ -23,11 +23,17 @@ void setDefaultCranking() {
|
|||
// After start enrichment
|
||||
#if !EFI_UNIT_TEST
|
||||
// don't set this for unit tests, as it makes things more complicated to test
|
||||
engineConfiguration->postCrankingFactor = 1.2;
|
||||
static const float defaultPostCrankingCLTBins[] = {
|
||||
-20.0f, 0.0f, 30.0f, 60.0f
|
||||
};
|
||||
static const uint16_t defaultPostCrankinDurationBins[] = {
|
||||
0, 1, 2, 3, 4, 6, 8, 10
|
||||
};
|
||||
copyArray(engineConfiguration->postCrankingCLTBins, defaultPostCrankingCLTBins);
|
||||
copyArray(engineConfiguration->postCrankingDurationBins, defaultPostCrankinDurationBins);
|
||||
setTable(engineConfiguration->postCrankingFactor, 1.2f);
|
||||
#endif
|
||||
|
||||
engineConfiguration->postCrankingDurationSec = 10;
|
||||
|
||||
setLinearCurve(config->crankingTpsCoef, /*from*/1, /*to*/1, 1);
|
||||
setLinearCurve(config->crankingTpsBins, 0, 100, 1);
|
||||
|
||||
|
|
|
@ -119,14 +119,17 @@ void EngineState::periodicFastCallback() {
|
|||
getLimpManager()->updateRevLimit(rpm);
|
||||
|
||||
// post-cranking fuel enrichment.
|
||||
float m_postCrankingFactor = interpolate3d(
|
||||
engineConfiguration->postCrankingFactor,
|
||||
engineConfiguration->postCrankingCLTBins, Sensor::getOrZero(SensorType::Clt),
|
||||
engineConfiguration->postCrankingDurationBins, engine->fuelComputer.running.timeSinceCrankingInSecs
|
||||
);
|
||||
// for compatibility reasons, apply only if the factor is greater than unity (only allow adding fuel)
|
||||
if (engineConfiguration->postCrankingFactor > 1.0f) {
|
||||
// use interpolation for correction taper
|
||||
engine->fuelComputer.running.postCrankingFuelCorrection = interpolateClamped(0.0f, engineConfiguration->postCrankingFactor,
|
||||
engineConfiguration->postCrankingDurationSec, 1.0f, engine->fuelComputer.running.timeSinceCrankingInSecs);
|
||||
} else {
|
||||
engine->fuelComputer.running.postCrankingFuelCorrection = 1.0f;
|
||||
// if the engine run time is past the last bin, disable ASE in case the table is filled with values more than 1.0, helps with compatibility
|
||||
if ((m_postCrankingFactor < 1.0f) || (engine->fuelComputer.running.timeSinceCrankingInSecs > engineConfiguration->postCrankingDurationBins[efi::size(engineConfiguration->postCrankingDurationBins)-1])) {
|
||||
m_postCrankingFactor = 1.0f;
|
||||
}
|
||||
engine->fuelComputer.running.postCrankingFuelCorrection = m_postCrankingFactor;
|
||||
|
||||
engine->ignitionState.cltTimingCorrection = getCltTimingCorrection();
|
||||
|
||||
|
|
|
@ -1246,8 +1246,11 @@ tle8888_mode_e tle8888mode;
|
|||
|
||||
pin_output_mode_e fan2PinMode;
|
||||
float fuelReferencePressure;This is the pressure at which your injector flow is known.\nFor example if your injectors flow 400cc/min at 3.5 bar, enter 350kpa here.;"kPa", 1, 0, 50, 700000, 0
|
||||
float postCrankingFactor;Fuel multiplier (enrichment) immediately after engine start;"mult", 1, 0, 1, 3, 2
|
||||
float postCrankingDurationSec;Time over which to taper out after start enrichment;"seconds", 1, 0, 0, 30, 0
|
||||
|
||||
float[CRANKING_ADVANCE_CURVE_SIZE x DWELL_CURVE_SIZE] postCrankingFactor;;"mult", 1, 0, 1, 3, 2
|
||||
float[CRANKING_ADVANCE_CURVE_SIZE] postCrankingCLTBins;;"C", 1, 0, -100, 100, 0
|
||||
float[DWELL_CURVE_SIZE] postCrankingDurationBins;;"sec", 1, 0, 0, 1000, 0
|
||||
|
||||
ThermistorConf auxTempSensor1
|
||||
ThermistorConf auxTempSensor2
|
||||
int16_t knockSamplingDuration;;"Deg", 1, 0, 0, 720, 0
|
||||
|
|
|
@ -1304,6 +1304,11 @@ curve = rangeMatrix, "Range Switch Input Matrix"
|
|||
yBins = hpfpCompensationLoadBins, running_fuel
|
||||
zBins = hpfpCompensation
|
||||
|
||||
table = postCrankingEnrichmentTbl, postCrankingEnrichmentMap, "After start enrichment", 1
|
||||
xBins = postCrankingCLTBins, coolant
|
||||
yBins = postCrankingDurationBins, seconds
|
||||
zBins = postCrankingFactor
|
||||
|
||||
|
||||
[GaugeConfigurations]
|
||||
@@LIVE_DATA_GAUGES_FROM_FILE@@
|
||||
|
@ -1834,7 +1839,7 @@ menuDialog = main
|
|||
|
||||
menu = "&Cranking"
|
||||
subMenu = crankingDialog, "Cranking settings"
|
||||
subMenu = postCrankingEnrichment, "After-start enrichment"
|
||||
subMenu = postCrankingEnrichmentTbl,"After-start enrichment"
|
||||
subMenu = primingFuelPulsePanel, "Priming pulse"
|
||||
subMenu = std_separator
|
||||
|
||||
|
@ -3965,10 +3970,6 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_
|
|||
field = "Fixed cranking advance", crankingTimingAngle, {useSeparateAdvanceForCranking == 0}
|
||||
field = "Fixed Cranking Dwell", ignitionDwellForCrankingMs
|
||||
|
||||
dialog = postCrankingEnrichment, "After start enrichment"
|
||||
field = "Post-Cranking factor", postCrankingFactor
|
||||
field = "Duration", postCrankingDurationSec
|
||||
|
||||
dialog = primingFuelPulsePanel, "Priming fuel pulse"
|
||||
field = "Priming delay", primingDelay
|
||||
panel = primingPulse
|
||||
|
|
Loading…
Reference in New Issue