diff --git a/src/gearbox.cpp b/src/gearbox.cpp index 859d533..80033b6 100644 --- a/src/gearbox.cpp +++ b/src/gearbox.cpp @@ -480,7 +480,12 @@ bool Gearbox::elapse_shift(ProfileGearChange req_lookup, AbstractProfile *profil ShiftingAlgorithm* algo; // Check if we exceed the pressure of low filling - if (sensor_data.static_torque > VEHICLE_CONFIG.engine_drag_torque/10.0 && sensor_data.input_rpm > 1500) { + bool is_manual = (profile == manual || profile == race); + + if ( + (is_manual && sensor_data.static_torque > 50 && sensor_data.input_rpm > 1500) || + (!is_manual && sensor_data.pedal_pos > 120 && sensor_data.input_rpm > 1500) + ) { algo = new ReleasingShift(&sid); } else { algo = new CrossoverShift(&sid); diff --git a/src/shifting_algo/shift_crossover.cpp b/src/shifting_algo/shift_crossover.cpp index 8b0158c..1449585 100644 --- a/src/shifting_algo/shift_crossover.cpp +++ b/src/shifting_algo/shift_crossover.cpp @@ -362,7 +362,7 @@ uint8_t CrossoverShift::step( // Limiting engine torque by this much (Computed later with indicated_torque - trq_req_targ = trq request output) int trq_req_targ = 0; // We can only request if engine torque is above engines min torque - if (sd->static_torque_wo_request > sd->min_torque && sd->driver_requested_torque && sd->input_rpm > 1200) { + if (sd->static_torque_wo_request > sd->min_torque && sd->driver_requested_torque > sd->min_torque && sd->input_rpm > 1200) { bool inc = false; if (phase_id == PHASE_MOMENTUM_RAMP && this->trq_req_start_time != 0) { trq_req_targ = this->trq_req_ramp_trq;