diff --git a/firmware/controllers/algo/launch_control.cpp b/firmware/controllers/algo/launch_control.cpp index 369009488f..99e1784e70 100644 --- a/firmware/controllers/algo/launch_control.cpp +++ b/firmware/controllers/algo/launch_control.cpp @@ -158,8 +158,8 @@ bool LaunchControlBase::isLaunchFuelRpmRetardCondition() const { return isLaunchRpmRetardCondition() && engineConfiguration->launchFuelCutEnable; } -SoftSparkLimiter::SoftSparkLimiter(bool p_allowHardCut) { - this->allowHardCut = p_allowHardCut; +SoftSparkLimiter::SoftSparkLimiter(const bool p_allowHardCut) + : allowHardCut(p_allowHardCut) { #if EFI_UNIT_TEST initLaunchControl(); #endif // EFI_UNIT_TEST diff --git a/firmware/controllers/algo/launch_control.h b/firmware/controllers/algo/launch_control.h index 9a6f877501..22f05346ee 100644 --- a/firmware/controllers/algo/launch_control.h +++ b/firmware/controllers/algo/launch_control.h @@ -46,7 +46,7 @@ private: */ class SoftSparkLimiter { public: - SoftSparkLimiter(bool allowHardCut); + SoftSparkLimiter(bool p_allowHardCut); /** * targetSkipRatio of '0' means 'do not skip', would always return false */ @@ -55,7 +55,7 @@ public: bool shouldSkip(); private: - bool allowHardCut; + const bool allowHardCut; bool wasJustSkipped = false; float targetSkipRatio = 0; };