diff --git a/src/profiles.cpp b/src/profiles.cpp index f210f60..7f1ce7d 100644 --- a/src/profiles.cpp +++ b/src/profiles.cpp @@ -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;