now we retard ignition only on pre-launch or launch conditions (#5611)
This commit is contained in:
parent
9308443f24
commit
7e4b2661d6
|
@ -106,16 +106,20 @@ angle_t getRunningAdvance(int rpm, float engineLoad) {
|
|||
#if EFI_LAUNCH_CONTROL
|
||||
if (engineConfiguration->launchControlEnabled && engineConfiguration->enableLaunchRetard) {
|
||||
const float launchAngle = engineConfiguration->launchTimingRetard;
|
||||
const int launchRpm = engineConfiguration->launchRpm;
|
||||
const int smoothRetardStartRpm = (launchRpm - engineConfiguration->launchRpmWindow);
|
||||
const int smoothRetardEndRpm = (launchRpm - engineConfiguration->launchCorrectionsEndRpm);
|
||||
if (smoothRetardStartRpm <= rpm) {
|
||||
if (engineConfiguration->launchSmoothRetard && (rpm <= smoothRetardEndRpm)) {
|
||||
// https://github.com/rusefi/rusefi/issues/5611#issuecomment-2130431696
|
||||
return interpolateClamped(smoothRetardStartRpm, advanceAngle, smoothRetardEndRpm, launchAngle, rpm);
|
||||
} else {
|
||||
return launchAngle;
|
||||
if (engine->launchController.isPreLaunchCondition) {
|
||||
const int launchRpm = engineConfiguration->launchRpm;
|
||||
const int smoothRetardStartRpm = (launchRpm - engineConfiguration->launchRpmWindow);
|
||||
const int smoothRetardEndRpm = (launchRpm - engineConfiguration->launchCorrectionsEndRpm);
|
||||
if (smoothRetardStartRpm <= rpm) {
|
||||
if (engineConfiguration->launchSmoothRetard && (rpm <= smoothRetardEndRpm)) {
|
||||
// https://github.com/rusefi/rusefi/issues/5611#issuecomment-2130431696
|
||||
return interpolateClamped(smoothRetardStartRpm, advanceAngle, smoothRetardEndRpm, launchAngle, rpm);
|
||||
} else {
|
||||
return launchAngle;
|
||||
}
|
||||
}
|
||||
} else if (engine->launchController.isLaunchCondition) {
|
||||
return launchAngle;
|
||||
}
|
||||
}
|
||||
#endif /* EFI_LAUNCH_CONTROL */
|
||||
|
|
|
@ -77,6 +77,10 @@ static void setUpTestParameters(
|
|||
} else {
|
||||
ASSERT_FALSE(engineConfiguration->launchSmoothRetard); // check default value
|
||||
}
|
||||
|
||||
engineConfiguration->launchActivationMode = ALWAYS_ACTIVE_LAUNCH; // to satisfy activateSwitchCondition
|
||||
engineConfiguration->launchSpeedThreshold = 0; // to satisfy speedCondition
|
||||
Sensor::setMockValue(SensorType::DriverThrottleIntent, 1.7); // to satisfy tpsCondition
|
||||
}
|
||||
|
||||
static void setUpTestParametersWithEnabledLaunchControl(
|
||||
|
|
Loading…
Reference in New Issue