light refactoring: forbid modification of SoftSparkLimiter::allowHardCut field (#6566)
This commit is contained in:
parent
d87d84138f
commit
eda1a54047
|
@ -158,8 +158,8 @@ bool LaunchControlBase::isLaunchFuelRpmRetardCondition() const {
|
||||||
return isLaunchRpmRetardCondition() && engineConfiguration->launchFuelCutEnable;
|
return isLaunchRpmRetardCondition() && engineConfiguration->launchFuelCutEnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
SoftSparkLimiter::SoftSparkLimiter(bool p_allowHardCut) {
|
SoftSparkLimiter::SoftSparkLimiter(const bool p_allowHardCut)
|
||||||
this->allowHardCut = p_allowHardCut;
|
: allowHardCut(p_allowHardCut) {
|
||||||
#if EFI_UNIT_TEST
|
#if EFI_UNIT_TEST
|
||||||
initLaunchControl();
|
initLaunchControl();
|
||||||
#endif // EFI_UNIT_TEST
|
#endif // EFI_UNIT_TEST
|
||||||
|
|
|
@ -46,7 +46,7 @@ private:
|
||||||
*/
|
*/
|
||||||
class SoftSparkLimiter {
|
class SoftSparkLimiter {
|
||||||
public:
|
public:
|
||||||
SoftSparkLimiter(bool allowHardCut);
|
SoftSparkLimiter(bool p_allowHardCut);
|
||||||
/**
|
/**
|
||||||
* targetSkipRatio of '0' means 'do not skip', would always return false
|
* targetSkipRatio of '0' means 'do not skip', would always return false
|
||||||
*/
|
*/
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
|
|
||||||
bool shouldSkip();
|
bool shouldSkip();
|
||||||
private:
|
private:
|
||||||
bool allowHardCut;
|
const bool allowHardCut;
|
||||||
bool wasJustSkipped = false;
|
bool wasJustSkipped = false;
|
||||||
float targetSkipRatio = 0;
|
float targetSkipRatio = 0;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue