diff --git a/firmware/controllers/algo/engine2.cpp b/firmware/controllers/algo/engine2.cpp index 7fb33ef8fd..44a30b280a 100644 --- a/firmware/controllers/algo/engine2.cpp +++ b/firmware/controllers/algo/engine2.cpp @@ -94,7 +94,7 @@ void EngineState::updateSparkSkip() { * We are applying launch controller spark skip ratio only for hard skip limiter (see * https://github.com/rusefi/rusefi/issues/6566#issuecomment-2153149902). */ - engine->launchController.getSparkSkipRatio() + engine->launchController.getSparkSkipRatio() + engine->shiftTorqueReductionController.getSparkSkipRatio() ); #endif // EFI_LAUNCH_CONTROL } diff --git a/firmware/controllers/algo/launch_control.cpp b/firmware/controllers/algo/launch_control.cpp index 1d33e65147..58b4845fef 100644 --- a/firmware/controllers/algo/launch_control.cpp +++ b/firmware/controllers/algo/launch_control.cpp @@ -164,7 +164,7 @@ SoftSparkLimiter::SoftSparkLimiter(const bool p_allowHardCut) void SoftSparkLimiter::updateTargetSkipRatio( const float luaSparkSkip, const float tractionControlSparkSkip, - const float launchControllerSparkSkipRatio + const float launchOrShiftTorqueReductionControllerSparkSkipRatio ) { targetSkipRatio = luaSparkSkip; if (engineConfiguration->useHardSkipInTraction) { @@ -180,7 +180,7 @@ void SoftSparkLimiter::updateTargetSkipRatio( * We are applying launch controller spark skip ratio only for hard skip limiter (see * https://github.com/rusefi/rusefi/issues/6566#issuecomment-2153149902). */ - targetSkipRatio += launchControllerSparkSkipRatio; + targetSkipRatio += launchOrShiftTorqueReductionControllerSparkSkipRatio; } } diff --git a/firmware/controllers/algo/launch_control.h b/firmware/controllers/algo/launch_control.h index 1b382483a7..94d0672e94 100644 --- a/firmware/controllers/algo/launch_control.h +++ b/firmware/controllers/algo/launch_control.h @@ -56,7 +56,7 @@ public: void updateTargetSkipRatio( float luaSoftSparkSkip, float tractionControlSparkSkip, - float launchControllerSparkSkipRatio = 0.0f + float launchOrShiftTorqueReductionControllerSparkSkipRatio = 0.0f ); [[nodiscard]] float getTargetSkipRatio() const { return targetSkipRatio; } diff --git a/firmware/controllers/algo/shift_torque_reduction_controller.cpp b/firmware/controllers/algo/shift_torque_reduction_controller.cpp index 24716eaaa4..f234669e2d 100644 --- a/firmware/controllers/algo/shift_torque_reduction_controller.cpp +++ b/firmware/controllers/algo/shift_torque_reduction_controller.cpp @@ -25,6 +25,14 @@ void ShiftTorqueReductionController::update() { } } +float ShiftTorqueReductionController::getSparkSkipRatio() const { + float result = 0.0f; + if (engineConfiguration->torqueReductionEnabled && isFlatShiftConditionSatisfied) { + result = engineConfiguration->torqueReductionIgnitionCut / 100.0f; + } + return result; +} + void ShiftTorqueReductionController::updateTriggerPinState() { switch (engineConfiguration->torqueReductionActivationMode) { case TORQUE_REDUCTION_BUTTON: { diff --git a/firmware/controllers/algo/shift_torque_reduction_controller.h b/firmware/controllers/algo/shift_torque_reduction_controller.h index 17338d3b14..0de83fca86 100644 --- a/firmware/controllers/algo/shift_torque_reduction_controller.h +++ b/firmware/controllers/algo/shift_torque_reduction_controller.h @@ -9,6 +9,8 @@ class ShiftTorqueReductionController : public shift_torque_reduction_state_s { public: void update(); + + float getSparkSkipRatio() const; private: void updateTriggerPinState(); void updateTriggerPinState(switch_input_pin_e pin, bool isPinInverted);