This commit is contained in:
andreika-git 2023-05-05 22:44:05 +03:00 committed by rusefillc
parent 586a043bbe
commit 7df63c03f6
2 changed files with 3 additions and 2 deletions

View File

@ -100,8 +100,8 @@ void LimpManager::updateState(int rpm, efitick_t nowNt) {
// Limit fuel only on boost pressure (limiting spark bends valves)
float mapCut = engineConfiguration->boostCutPressure;
if (mapCut != 0) {
// require drop of 20kPa to resume fuel
if (m_boostCutHysteresis.test(Sensor::getOrZero(SensorType::Map), mapCut, mapCut - 20)) {
// require drop of 'boostCutPressureHyst' kPa to resume fuel
if (m_boostCutHysteresis.test(Sensor::getOrZero(SensorType::Map), mapCut, mapCut - engineConfiguration->boostCutPressureHyst)) {
allowFuel.clear(ClearReason::BoostCut);
}
}

View File

@ -172,6 +172,7 @@ TEST(limp, boostCut) {
// Cut above 100kPa
engineConfiguration->boostCutPressure = 100;
engineConfiguration->boostCutPressureHyst = 20;
LimpManager dut;