diff --git a/firmware/controllers/algo/launch_control.cpp b/firmware/controllers/algo/launch_control.cpp index 72e9494fa6..96c8ceb754 100644 --- a/firmware/controllers/algo/launch_control.cpp +++ b/firmware/controllers/algo/launch_control.cpp @@ -103,7 +103,7 @@ LaunchCondition LaunchControlBase::calculateLaunchCondition(const int rpm) { LaunchControlBase::LaunchControlBase() { launchActivatePinState = false; - isLaunchPreCondition = false; + isPreLaunchCondition = false; isLaunchCondition = false; } @@ -119,7 +119,7 @@ void LaunchControlBase::update() { const int rpm = Sensor::getOrZero(SensorType::Rpm); const LaunchCondition launchCondition = calculateLaunchCondition(rpm); isLaunchCondition = combinedConditions = (launchCondition == LaunchCondition::Launch); - isLaunchPreCondition = (launchCondition == LaunchCondition::PreLaunch); + isPreLaunchCondition = (launchCondition == LaunchCondition::PreLaunch); //and still recalculate in case user changed the values retardThresholdRpm = engineConfiguration->launchRpm; @@ -144,7 +144,7 @@ float LaunchControlBase::calculateSparkSkipRatio(const int rpm) const { if (engineConfiguration->launchControlEnabled && engineConfiguration->launchSparkCutEnable) { if (isLaunchCondition) { result = 1.0f; - } else if (isLaunchPreCondition) { + } else if (isPreLaunchCondition) { const int launchRpm = engineConfiguration->launchRpm; const int sparkSkipStartRpm = launchRpm - engineConfiguration->launchRpmWindow; if (sparkSkipStartRpm <= rpm) { diff --git a/firmware/controllers/algo/launch_control_state.txt b/firmware/controllers/algo/launch_control_state.txt index ee2f21a693..a80079bb6d 100644 --- a/firmware/controllers/algo/launch_control_state.txt +++ b/firmware/controllers/algo/launch_control_state.txt @@ -4,7 +4,7 @@ int retardThresholdRpm bit combinedConditions bit launchActivatePinState -bit isLaunchPreCondition +bit isPreLaunchCondition bit isLaunchCondition bit isSwitchActivated bit isClutchActivated diff --git a/unit_tests/tests/launch/test_spark_skip_ratio.cpp b/unit_tests/tests/launch/test_spark_skip_ratio.cpp index 1d63127ea4..70c04301d3 100644 --- a/unit_tests/tests/launch/test_spark_skip_ratio.cpp +++ b/unit_tests/tests/launch/test_spark_skip_ratio.cpp @@ -123,17 +123,17 @@ void SparkSkipRatioTest::doTest( if (testDataItem.expectedLaunchCondition.has_value()) { switch (testDataItem.expectedLaunchCondition.value()) { case LaunchCondition::NotMet: { - EXPECT_FALSE(engine->launchController.isLaunchPreCondition) << testDataItem.context; + EXPECT_FALSE(engine->launchController.isPreLaunchCondition) << testDataItem.context; EXPECT_FALSE(engine->launchController.isLaunchCondition) << testDataItem.context; break; } case LaunchCondition::PreLaunch: { - EXPECT_TRUE(engine->launchController.isLaunchPreCondition) << testDataItem.context; + EXPECT_TRUE(engine->launchController.isPreLaunchCondition) << testDataItem.context; EXPECT_FALSE(engine->launchController.isLaunchCondition) << testDataItem.context; break; } case LaunchCondition::Launch: { - EXPECT_FALSE(engine->launchController.isLaunchPreCondition) << testDataItem.context; + EXPECT_FALSE(engine->launchController.isPreLaunchCondition) << testDataItem.context; EXPECT_TRUE(engine->launchController.isLaunchCondition) << testDataItem.context; break; }