boostCutPressureHyst impl+tests https://github.com/rusefi/rusefi/issues/4529
This commit is contained in:
parent
586a043bbe
commit
7df63c03f6
|
@ -100,8 +100,8 @@ void LimpManager::updateState(int rpm, efitick_t nowNt) {
|
||||||
// Limit fuel only on boost pressure (limiting spark bends valves)
|
// Limit fuel only on boost pressure (limiting spark bends valves)
|
||||||
float mapCut = engineConfiguration->boostCutPressure;
|
float mapCut = engineConfiguration->boostCutPressure;
|
||||||
if (mapCut != 0) {
|
if (mapCut != 0) {
|
||||||
// require drop of 20kPa to resume fuel
|
// require drop of 'boostCutPressureHyst' kPa to resume fuel
|
||||||
if (m_boostCutHysteresis.test(Sensor::getOrZero(SensorType::Map), mapCut, mapCut - 20)) {
|
if (m_boostCutHysteresis.test(Sensor::getOrZero(SensorType::Map), mapCut, mapCut - engineConfiguration->boostCutPressureHyst)) {
|
||||||
allowFuel.clear(ClearReason::BoostCut);
|
allowFuel.clear(ClearReason::BoostCut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,6 +172,7 @@ TEST(limp, boostCut) {
|
||||||
|
|
||||||
// Cut above 100kPa
|
// Cut above 100kPa
|
||||||
engineConfiguration->boostCutPressure = 100;
|
engineConfiguration->boostCutPressure = 100;
|
||||||
|
engineConfiguration->boostCutPressureHyst = 20;
|
||||||
|
|
||||||
LimpManager dut;
|
LimpManager dut;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue