mirror of https://github.com/rusefi/rusefi-1.git
disable fuel trim shortly after DFCO (#3847)
* vss based dfco * fix digits while we're here * fix some other digits for fun * don't use custom assert * simplify test * less than or equal, test vss behavior * disable closed loop fuel after dfco1 * I can't type * correct comparison helps * poke
This commit is contained in:
parent
dca698720e
commit
28950acf3e
|
@ -46,9 +46,20 @@ bool DfcoController::getState() const {
|
||||||
|
|
||||||
void DfcoController::update() {
|
void DfcoController::update() {
|
||||||
// Run state machine
|
// Run state machine
|
||||||
m_isDfco = getState();
|
bool newState = getState();
|
||||||
|
|
||||||
|
// If fuel is cut, reset the timer
|
||||||
|
if (newState) {
|
||||||
|
m_timeSinceCut.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_isDfco = newState;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DfcoController::cutFuel() const {
|
bool DfcoController::cutFuel() const {
|
||||||
return m_isDfco;
|
return m_isDfco;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float DfcoController::getTimeSinceCut() const {
|
||||||
|
return m_timeSinceCut.getElapsedSeconds();
|
||||||
|
}
|
||||||
|
|
|
@ -7,7 +7,11 @@ public:
|
||||||
|
|
||||||
bool cutFuel() const;
|
bool cutFuel() const;
|
||||||
|
|
||||||
|
float getTimeSinceCut() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool getState() const;
|
bool getState() const;
|
||||||
bool m_isDfco = false;
|
bool m_isDfco = false;
|
||||||
|
|
||||||
|
Timer m_timeSinceCut;
|
||||||
};
|
};
|
||||||
|
|
|
@ -83,6 +83,12 @@ bool shouldUpdateCorrection(SensorType sensor) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pause correction if DFCO was active recently
|
||||||
|
auto timeSinceDfco = engine->module<DfcoController>()->getTimeSinceCut();
|
||||||
|
if (timeSinceDfco < engineConfiguration->noFuelTrimAfterDfcoTime) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1173,7 +1173,7 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\
|
||||||
uint8_t autoscale tpsAccelLookback;+How long to look back for TPS-based acceleration enrichment. Increasing this time will trigger enrichment for longer when a throttle position change occurs.;"sec", 0.05, 0, 0, 5, 2
|
uint8_t autoscale tpsAccelLookback;+How long to look back for TPS-based acceleration enrichment. Increasing this time will trigger enrichment for longer when a throttle position change occurs.;"sec", 0.05, 0, 0, 5, 2
|
||||||
uint8_t coastingFuelCutVssLow;+Below this speed, disable DFCO. Use this to prevent jerkiness from fuel enable/disable in low gears.;"kph", 1, 0, 0, 255, 0
|
uint8_t coastingFuelCutVssLow;+Below this speed, disable DFCO. Use this to prevent jerkiness from fuel enable/disable in low gears.;"kph", 1, 0, 0, 255, 0
|
||||||
uint8_t coastingFuelCutVssHigh;+Above this speed, allow DFCO. Use this to prevent jerkiness from fuel enable/disable in low gears.;"kph", 1, 0, 0, 255, 0
|
uint8_t coastingFuelCutVssHigh;+Above this speed, allow DFCO. Use this to prevent jerkiness from fuel enable/disable in low gears.;"kph", 1, 0, 0, 255, 0
|
||||||
uint8_t[1] unused1689;;"", 1,0,0,0,0
|
uint8_t autoscale noFuelTrimAfterDfcoTime;Pause closed loop fueling after deceleration fuel cut occurs. Set this to a little longer than however long is required for normal fueling behavior to resume after fuel cut.;"sec", 0.1, 0, 0, 10, 1
|
||||||
float tpsAccelEnrichmentThreshold;+Maximum change delta of TPS percentage over the 'length'. Actual TPS change has to be above this value in order for TPS/TPS acceleration to kick in.;"roc", 1, 0, 0, 200, 1
|
float tpsAccelEnrichmentThreshold;+Maximum change delta of TPS percentage over the 'length'. Actual TPS change has to be above this value in order for TPS/TPS acceleration to kick in.;"roc", 1, 0, 0, 200, 1
|
||||||
|
|
||||||
int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0
|
int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0
|
||||||
|
|
|
@ -3676,6 +3676,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
||||||
field = "Vehicle speed restore below", coastingFuelCutVssLow, {coastingFuelCutEnabled == 1}
|
field = "Vehicle speed restore below", coastingFuelCutVssLow, {coastingFuelCutEnabled == 1}
|
||||||
field = "Cut fuel below TPS", coastingFuelCutTps, {coastingFuelCutEnabled == 1}
|
field = "Cut fuel below TPS", coastingFuelCutTps, {coastingFuelCutEnabled == 1}
|
||||||
field = "Cut fuel below MAP", coastingFuelCutMap, {coastingFuelCutEnabled == 1}
|
field = "Cut fuel below MAP", coastingFuelCutMap, {coastingFuelCutEnabled == 1}
|
||||||
|
field = "Inhibit closed loop fuel after cut", noFuelTrimAfterDfcoTime, {coastingFuelCutEnabled == 1}
|
||||||
|
|
||||||
dialog = rotaryDialog, "Rotary"
|
dialog = rotaryDialog, "Rotary"
|
||||||
field = "Enable Trailing Sparks", enableTrailingSparks
|
field = "Enable Trailing Sparks", enableTrailingSparks
|
||||||
|
|
Loading…
Reference in New Issue