implement ignition cut for shift torque reduction #5608
This commit is contained in:
parent
896091ebae
commit
1a56187c57
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue