Skip to content

Commit

Permalink
Test disabling load based upshift blocking (For EGS51)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnd-ash committed Nov 17, 2024
1 parent d58fc57 commit bf136f7
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/profiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,20 @@ bool StandardProfile::should_upshift(GearboxGear current_gear, SensorData* senso
//}
// Load check
if (can_upshift) {
if (sensors->max_torque != 0) {
float demanded_load = (MAX(sensors->converted_driver_torque, 0) * 100) / sensors->max_torque;
if (demanded_load > 30) {
can_upshift = false;
}
if (sensors->pedal_delta->get_average() > 20.0) {
can_upshift = false;
}
//if (sensors->max_torque != 0) {
// float demanded_load = (MAX(sensors->converted_driver_torque, 0) * 100) / sensors->max_torque;
// if (demanded_load > 30) {
// can_upshift = false;
// }
//}
}
if (can_upshift) {
// Stop 'sporatic' upshifting when the user lets go of the pedal quickly (This will trigger a brief wait period)
if (sensors->pedal_delta->get_average() < -10.0) {
can_upshift = false;
}
}
return can_upshift;
Expand Down

0 comments on commit bf136f7

Please sign in to comment.