From fdd60bee2d2d3f0def680d2c6c9d997d0763b14e Mon Sep 17 00:00:00 2001 From: Ashcon Mohseninia Date: Thu, 18 Jul 2024 06:38:11 +0200 Subject: [PATCH] Improvements to crossover shifting --- src/shifting_algo/shift_crossover.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shifting_algo/shift_crossover.cpp b/src/shifting_algo/shift_crossover.cpp index f60d820a..8b0158c7 100644 --- a/src/shifting_algo/shift_crossover.cpp +++ b/src/shifting_algo/shift_crossover.cpp @@ -59,7 +59,7 @@ uint8_t CrossoverShift::step( if (phase_elapsed >= 100) { // Turn on the switching valve! pressure_manager->set_shift_circuit(sid->inf.shift_circuit, true); - sid->tcc->set_shift_target_state(InternalTccState::Open); + sid->tcc->set_shift_target_state(sd, InternalTccState::Open); ret = PHASE_PREFILL; } } else if (phase_id == PHASE_PREFILL) { @@ -72,7 +72,7 @@ uint8_t CrossoverShift::step( if (elapsed > sid->prefill_info.fill_time || sid->ptr_r_clutch_speeds->on_clutch_speed > 100) { // 0 -> 1 -> 2 (Torque > Drag/2) // 0 -> 3 -> 4 -> 5 (Torque <= Drag/2) - if (abs_input_torque > VEHICLE_CONFIG.engine_drag_torque/20.0 && is_upshift) { + if (abs_input_torque > VEHICLE_CONFIG.engine_drag_torque/20.0) { this->prefill_phase_shift = 1; this->do_high_filling = true; } else { @@ -91,6 +91,10 @@ uint8_t CrossoverShift::step( this->prefill_phase_shift = 2; this->ts_phase_shift = phase_elapsed; } + // Skip the rest of the prefilling if we are standstill / very low speed + if (sd->input_rpm < 800) { + ret = PHASE_OVERLAP; + } } else if (2 == this->prefill_phase_shift) { uint16_t elapsed = phase_elapsed - this->ts_phase_shift; p_now->on_clutch = sid->prefill_info.low_fill_pressure_on_clutch;