Launch control bug? "range" thing is confusing #4348
refactoring: reducing confusion
This commit is contained in:
parent
8213252f45
commit
f9ba8bf82c
|
@ -66,10 +66,10 @@ static angle_t getRunningAdvance(int rpm, float engineLoad) {
|
||||||
if (engine->launchController.isLaunchCondition && engineConfiguration->enableLaunchRetard) {
|
if (engine->launchController.isLaunchCondition && engineConfiguration->enableLaunchRetard) {
|
||||||
if (engineConfiguration->launchSmoothRetard) {
|
if (engineConfiguration->launchSmoothRetard) {
|
||||||
float launchAngle = engineConfiguration->launchTimingRetard;
|
float launchAngle = engineConfiguration->launchTimingRetard;
|
||||||
int launchAdvanceRpmRange = engineConfiguration->launchTimingRpmRange;
|
int launchRpmWithTimingRange = launchRpm + engineConfiguration->launchTimingRpmRange;
|
||||||
int launchRpm = engineConfiguration->launchRpm;
|
int launchRpm = engineConfiguration->launchRpm;
|
||||||
// interpolate timing from rpm at launch triggered to full retard at launch launchRpm + launchTimingRpmRange
|
// interpolate timing from rpm at launch triggered to full retard at launch launchRpm + launchTimingRpmRange
|
||||||
return interpolateClamped(launchRpm, advanceAngle, (launchRpm + launchAdvanceRpmRange), launchAngle, rpm);
|
return interpolateClamped(launchRpm, advanceAngle, launchRpmWithTimingRange, launchAngle, rpm);
|
||||||
} else {
|
} else {
|
||||||
return engineConfiguration->launchTimingRetard;
|
return engineConfiguration->launchTimingRetard;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue