diff --git a/unit_tests/tests/shift_torque_reduction/flat_shift_condition_test_base.cpp b/unit_tests/tests/shift_torque_reduction/flat_shift_condition_test_base.cpp index cd746297d4..8de21c3471 100644 --- a/unit_tests/tests/shift_torque_reduction/flat_shift_condition_test_base.cpp +++ b/unit_tests/tests/shift_torque_reduction/flat_shift_condition_test_base.cpp @@ -19,7 +19,7 @@ void FlatShiftConditionTestBase::SetUp() { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLimitTorqueReductionTime(false) .setTorqueReductionIgnitionCut(m_torqueReductionIgnitionCut) .setTorqueReductionIgnitionRetard(m_torqueReductionIgnitionRetard) diff --git a/unit_tests/tests/shift_torque_reduction/shift_torque_reduction_test_base.cpp b/unit_tests/tests/shift_torque_reduction/shift_torque_reduction_test_base.cpp index 660af44202..93f1af7c96 100644 --- a/unit_tests/tests/shift_torque_reduction/shift_torque_reduction_test_base.cpp +++ b/unit_tests/tests/shift_torque_reduction/shift_torque_reduction_test_base.cpp @@ -20,15 +20,17 @@ ShiftTorqueReductionTestConfig ShiftTorqueReductionTestConfig::setTorqueReductio return *this; } -ShiftTorqueReductionTestConfig ShiftTorqueReductionTestConfig::setTriggerPin( +ShiftTorqueReductionTestConfig ShiftTorqueReductionTestConfig::setTorqueReductionTriggerPin( const std::optional value ) { m_torqueReductionTriggerPin = value; return *this; } -ShiftTorqueReductionTestConfig ShiftTorqueReductionTestConfig::setPinInverted(const std::optional value) { - m_pinInverted = value; +ShiftTorqueReductionTestConfig ShiftTorqueReductionTestConfig::setTorqueReductionTriggerPinInverted( + const std::optional value +) { + m_torqueReductionTriggerPinInverted = value; return *this; } @@ -85,8 +87,8 @@ ShiftTorqueReductionTestConfig ShiftTorqueReductionTestConfig::setTorqueReductio void ShiftTorqueReductionTestBase::setUpTestConfig(const ShiftTorqueReductionTestConfig& config) { getTestEngineConfiguration().configureTorqueReductionEnabled(config.getTorqueReductionEnabled()); getTestEngineConfiguration().configureTorqueReductionActivationMode(config.getTorqueReductionActivationMode()); - getTestEngineConfiguration().configureTorqueReductionButton(config.getTriggerPin()); - getTestEngineConfiguration().configureTorqueReductionButtonInverted(config.getPinInverted()); + getTestEngineConfiguration().configureTorqueReductionTriggerPin(config.getTorqueReductionTriggerPin()); + getTestEngineConfiguration().configureTorqueReductionButtonInverted(config.getTorqueReductionTriggerPinInverted()); getTestEngineConfiguration().configureLaunchActivatePin(config.getLaunchActivatePin()); getTestEngineConfiguration().configureLaunchActivateInverted(config.getLaunchActivateInverted()); getTestEngineConfiguration().configureLimitTorqueReductionTime(config.getLimitTorqueReductionTime()); diff --git a/unit_tests/tests/shift_torque_reduction/shift_torque_reduction_test_base.h b/unit_tests/tests/shift_torque_reduction/shift_torque_reduction_test_base.h index 53e12d8bbd..8c02c3e2d2 100644 --- a/unit_tests/tests/shift_torque_reduction/shift_torque_reduction_test_base.h +++ b/unit_tests/tests/shift_torque_reduction/shift_torque_reduction_test_base.h @@ -12,8 +12,8 @@ public: std::optional getTorqueReductionActivationMode() const { return m_torqueReductionActivationMode; } - std::optional getTriggerPin() const { return m_torqueReductionTriggerPin; } - std::optional getPinInverted() const { return m_pinInverted; } + std::optional getTorqueReductionTriggerPin() const { return m_torqueReductionTriggerPin; } + std::optional getTorqueReductionTriggerPinInverted() const { return m_torqueReductionTriggerPinInverted; } std::optional getLaunchActivatePin() const { return m_launchActivatePin; } std::optional getLaunchActivateInverted() const { return m_launchActivateInverted; } std::optional getLimitTorqueReductionTime() const { return m_limitTorqueReductionTime; } @@ -29,8 +29,8 @@ public: ShiftTorqueReductionTestConfig setTorqueReductionActivationMode( std::optional value ); - ShiftTorqueReductionTestConfig setTriggerPin(std::optional value); - ShiftTorqueReductionTestConfig setPinInverted(std::optional value); + ShiftTorqueReductionTestConfig setTorqueReductionTriggerPin(std::optional value); + ShiftTorqueReductionTestConfig setTorqueReductionTriggerPinInverted(std::optional value); ShiftTorqueReductionTestConfig setLaunchActivatePin(std::optional value); ShiftTorqueReductionTestConfig setLaunchActivateInverted(std::optional value); ShiftTorqueReductionTestConfig setLimitTorqueReductionTime(std::optional value); @@ -43,7 +43,7 @@ private: std::optional m_isTorqueReductionEnabled; std::optional m_torqueReductionActivationMode; std::optional m_torqueReductionTriggerPin; - std::optional m_pinInverted; + std::optional m_torqueReductionTriggerPinInverted; std::optional m_launchActivatePin; std::optional m_launchActivateInverted; std::optional m_limitTorqueReductionTime; diff --git a/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_flat_shift_condition.cpp b/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_flat_shift_condition.cpp index e94ce3e9ea..1c64549f0c 100644 --- a/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_flat_shift_condition.cpp +++ b/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_flat_shift_condition.cpp @@ -29,7 +29,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLimitTorqueReductionTime(true) .setTorqueReductionTime(TEST_TORQUE_REDUCTION_TIME) .setTorqueReductionArmingRpm(TEST_TORQUE_REDUCTION_ARMING_RPM) diff --git a/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_time_condition.cpp b/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_time_condition.cpp index 101956a73c..fdd4f8db44 100644 --- a/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_time_condition.cpp +++ b/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_time_condition.cpp @@ -45,7 +45,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLimitTorqueReductionTime(true) .setTorqueReductionTime(TEST_TORQUE_REDUCTION_TIME) ); @@ -64,7 +64,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLimitTorqueReductionTime(true) .setTorqueReductionTime(TEST_TORQUE_REDUCTION_TIME) ); @@ -82,7 +82,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLimitTorqueReductionTime(true) .setTorqueReductionTime(TEST_TORQUE_REDUCTION_TIME) ); @@ -107,7 +107,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLimitTorqueReductionTime(true) .setTorqueReductionTime(IMMEDIATELY) ); @@ -132,7 +132,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLimitTorqueReductionTime(false) .setTorqueReductionTime(TEST_TORQUE_REDUCTION_TIME) ); diff --git a/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_trigger_pin_state.cpp b/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_trigger_pin_state.cpp index 04be930845..d6297184c6 100644 --- a/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_trigger_pin_state.cpp +++ b/unit_tests/tests/shift_torque_reduction/test_shift_torque_reduction_trigger_pin_state.cpp @@ -69,7 +69,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLaunchActivatePin(TEST_LAUNCH_BUTTON_PIN) ); @@ -102,8 +102,8 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) - .setPinInverted(true) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPinInverted(true) ); checkShiftTorqueReductionStateAfterPeriodicFastCallback({ "Default trigger pin state", true, true }); @@ -123,7 +123,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(true) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::LAUNCH_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLaunchActivatePin(TEST_LAUNCH_BUTTON_PIN) ); @@ -156,7 +156,7 @@ namespace { setUpTestConfig(ShiftTorqueReductionTestConfig() .setTorqueReductionEnabled(false) .setTorqueReductionActivationMode(torqueReductionActivationMode_e::TORQUE_REDUCTION_BUTTON) - .setTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) + .setTorqueReductionTriggerPin(TEST_TORQUE_REDUCTION_BUTTON_PIN) .setLaunchActivatePin(TEST_LAUNCH_BUTTON_PIN) ); diff --git a/unit_tests/tests/util/test_engine_configuration.cpp b/unit_tests/tests/util/test_engine_configuration.cpp index c2ac314df0..812a0ea9b7 100644 --- a/unit_tests/tests/util/test_engine_configuration.cpp +++ b/unit_tests/tests/util/test_engine_configuration.cpp @@ -142,7 +142,7 @@ void TestEngineConfiguration::configureTorqueReductionActivationMode( } } -void TestEngineConfiguration::configureTorqueReductionButton(const std::optional pin) { +void TestEngineConfiguration::configureTorqueReductionTriggerPin(const std::optional pin) { if (pin.has_value()) { engineConfiguration->torqueReductionTriggerPin = pin.value(); } else { diff --git a/unit_tests/tests/util/test_engine_configuration.h b/unit_tests/tests/util/test_engine_configuration.h index c52787043f..cd046b3640 100644 --- a/unit_tests/tests/util/test_engine_configuration.h +++ b/unit_tests/tests/util/test_engine_configuration.h @@ -31,7 +31,7 @@ public: // Shift Torque Reduction (Flat Shift) void configureTorqueReductionEnabled(std::optional isTorqueReductionEnabled); void configureTorqueReductionActivationMode(std::optional activationMode); - void configureTorqueReductionButton(std::optional pin); + void configureTorqueReductionTriggerPin(std::optional pin); void configureTorqueReductionButtonInverted(std::optional pinInverted); void configureLaunchActivatePin(std::optional pin); void configureLaunchActivateInverted(std::optional pinInverted);