only:mre_f4
This commit is contained in:
Andrey 2023-02-24 22:48:33 -05:00
parent dd83cbb325
commit 1c7a800d7b
1 changed files with 11 additions and 2 deletions

View File

@ -500,11 +500,20 @@ void onTriggerEventSparkLogic(int rpm, efitick_t edgeTimestamp, float currentPha
#endif // EFI_LAUNCH_CONTROL
#if EFI_ANTILAG_SYSTEM && EFI_LAUNCH_CONTROL
if (engine->antilagController.isAntilagCondition) {
if (engine->ALSsoftSparkLimiter.shouldSkip()) {
continue;
}
auto ALSSkipRatio = engineConfiguration->ALSSkipRatio;
engine->ALSsoftSparkLimiter.setTargetSkipRatio(ALSSkipRatio);
}
float throttleIntent = Sensor::getOrZero(SensorType::DriverThrottleIntent);
engine->antilagController.timingALSSkip = interpolate3d(
config->ALSIgnSkipTable,
config->alsIgnSkipLoadBins, throttleIntent,
config->alsIgnSkiprpmBins, rpm
);
auto ALSSkipRatio = engine->antilagController.timingALSSkip;
engine->ALSsoftSparkLimiter.setTargetSkipRatio(ALSSkipRatio/100);
#endif // EFI_ANTILAG_SYSTEM
scheduleSparkEvent(limitedSpark, event, rpm, edgeTimestamp, currentPhase, nextPhase);