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:
parent
3aeed0dbea
commit
dbcc165a11
|
@ -405,14 +405,6 @@ void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp) {
|
||||||
engine->outputChannels.fuelCutReason = (int8_t)limitedFuelState.reason;
|
engine->outputChannels.fuelCutReason = (int8_t)limitedFuelState.reason;
|
||||||
bool limitedFuel = !limitedFuelState.value;
|
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 (trgEventIndex == 0) {
|
||||||
if (HAVE_CAM_INPUT()) {
|
if (HAVE_CAM_INPUT()) {
|
||||||
engine->triggerCentral.validateCamVvtCounters();
|
engine->triggerCentral.validateCamVvtCounters();
|
||||||
|
|
|
@ -76,6 +76,17 @@ todo AndreiKA this change breaks 22 unit tests?
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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;
|
m_transientAllowInjection = allowFuel;
|
||||||
m_transientAllowIgnition = allowSpark;
|
m_transientAllowIgnition = allowSpark;
|
||||||
|
|
|
@ -13,7 +13,8 @@ enum class ClearReason : uint8_t {
|
||||||
BoostCut, // 5
|
BoostCut, // 5
|
||||||
OilPressure,
|
OilPressure,
|
||||||
StopRequested, // 7
|
StopRequested, // 7
|
||||||
EtbProblem,
|
EtbProblem, // 8
|
||||||
|
LaunchCut, // 9
|
||||||
};
|
};
|
||||||
|
|
||||||
// Only allows clearing the value, but never resetting it.
|
// Only allows clearing the value, but never resetting it.
|
||||||
|
|
Loading…
Reference in New Issue