Launch fuel and spark cut issue (#3988)

* Launch fual and spark cut issue

* moved launch cuts to limp_manager

* Applied recomendations

* Auto-generated configs and docs

* Added recomendations

* Auto-generated configs and docs

Co-authored-by: GitHub build-firmware Action <action@github.com>
Co-authored-by: Benas <bbrazdziunas@gavea.co.uk>
This commit is contained in:
Benas Brazdziunas 2022-03-11 14:27:42 +00:00 committed by GitHub
parent 3958a16dd5
commit 2035c2fa7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View File

@ -404,15 +404,7 @@ void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp) {
LimpState limitedFuelState = engine->limpManager.allowInjection();
engine->outputChannels.fuelCutReason = (int8_t)limitedFuelState.reason;
bool limitedFuel = !limitedFuelState.value;
#if EFI_LAUNCH_CONTROL
if (engine->launchController.isLaunchCondition && !limitedSpark && !limitedFuel) {
/* in case we are not already on a limited conditions, check launch as well */
limitedSpark &= engine->launchController.isLaunchSparkRpmRetardCondition();
limitedFuel &= engine->launchController.isLaunchFuelRpmRetardCondition();
}
#endif
if (trgEventIndex == 0) {
if (HAVE_CAM_INPUT()) {
engine->triggerCentral.validateCamVvtCounters();

View File

@ -75,6 +75,17 @@ todo AndreiKA this change breaks 22 unit tests?
allowSpark.clear();
*/
}
// Fuel cut if launch control engaged
if (engine->launchController.isLaunchFuelRpmRetardCondition()) {
allowFuel.clear(ClearReason::LaunchCut);
}
// Spark cut if launch control engaged
if (engine->launchController.isLaunchSparkRpmRetardCondition()) {
allowSpark.clear(ClearReason::LaunchCut);
}
m_transientAllowInjection = allowFuel;

View File

@ -13,7 +13,8 @@ enum class ClearReason : uint8_t {
BoostCut, // 5
OilPressure,
StopRequested, // 7
EtbProblem,
EtbProblem, // 8
LaunchCut, // 9
};
// Only allows clearing the value, but never resetting it.