From bf136f7c686b47ed36b7cce4d11a7c6b831d2f73 Mon Sep 17 00:00:00 2001 From: Ashcon Mohseninia Date: Sun, 17 Nov 2024 10:46:55 +0100 Subject: [PATCH] Test disabling load based upshift blocking (For EGS51) --- src/profiles.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/profiles.cpp b/src/profiles.cpp index f210f602..7f1ce7d8 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;