This commit is contained in:
parent
5da0266b1a
commit
cd08b71b37
|
@ -59,6 +59,12 @@ bool AntilagSystemBase::isALSMaxThrottleIntentCondition() const {
|
||||||
return engineConfiguration->ALSMaxTPS > throttleIntent;
|
return engineConfiguration->ALSMaxTPS > throttleIntent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AntilagSystemBase::isInsideALSTimerCondition() {
|
||||||
|
auto ALStime = ALStimer.getElapsedSeconds();
|
||||||
|
|
||||||
|
return ALStime < engineConfiguration->ALSMaxDuration;
|
||||||
|
}
|
||||||
|
|
||||||
bool AntilagSystemBase::isAntilagConditionMet(int rpm) {
|
bool AntilagSystemBase::isAntilagConditionMet(int rpm) {
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,6 +87,10 @@ void AntilagSystemBase::update() {
|
||||||
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||||
isAntilagCondition = engineConfiguration->antiLagEnabled && isAntilagConditionMet(rpm);
|
isAntilagCondition = engineConfiguration->antiLagEnabled && isAntilagConditionMet(rpm);
|
||||||
|
|
||||||
|
if (!ALSMaxRPMCondition) {
|
||||||
|
ALStimer.reset();
|
||||||
|
}
|
||||||
|
|
||||||
#if EFI_ANTILAG_SYSTEM
|
#if EFI_ANTILAG_SYSTEM
|
||||||
fuelALSCorrection = getFuelALSCorrection(rpm);
|
fuelALSCorrection = getFuelALSCorrection(rpm);
|
||||||
#endif // EFI_ANTILAG_SYSTEM
|
#endif // EFI_ANTILAG_SYSTEM
|
||||||
|
|
Loading…
Reference in New Issue