From 77d440681de3b7b08895fa1b20daad182f25be43 Mon Sep 17 00:00:00 2001 From: AlkaMotors <37931458+AlkaMotors@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:09:34 -0400 Subject: [PATCH 1/2] Adjust previously set startup duty cycle for driving brake --- Src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/main.c b/Src/main.c index 9c694e26..4b2a62aa 100644 --- a/Src/main.c +++ b/Src/main.c @@ -668,8 +668,8 @@ void loadEEpromSettings() dead_time_override = 200; } } - min_startup_duty = eepromBuffer.startup_power + dead_time_override; - minimum_duty_cycle = eepromBuffer.startup_power / 2 + dead_time_override; + min_startup_duty = min_startup_duty + dead_time_override; + minimum_duty_cycle = minimum_duty_cycle + dead_time_override; throttle_max_at_low_rpm = throttle_max_at_low_rpm + dead_time_override; startup_max_duty_cycle = startup_max_duty_cycle + dead_time_override; #ifdef STMICRO From 77a3a9c747be7e0ffe657d27a6854efb22a9df40 Mon Sep 17 00:00:00 2001 From: AlkaMotors <37931458+AlkaMotors@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:09:34 -0400 Subject: [PATCH 2/2] Do not adjust dead time override if driving brake set to 10 --- Src/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Src/main.c b/Src/main.c index 4b2a62aa..d92dcbee 100644 --- a/Src/main.c +++ b/Src/main.c @@ -667,7 +667,6 @@ void loadEEpromSettings() if (dead_time_override > 200) { dead_time_override = 200; } - } min_startup_duty = min_startup_duty + dead_time_override; minimum_duty_cycle = minimum_duty_cycle + dead_time_override; throttle_max_at_low_rpm = throttle_max_at_low_rpm + dead_time_override; @@ -681,7 +680,7 @@ void loadEEpromSettings() #ifdef GIGADEVICES TIMER_CCHP(TIMER0) |= dead_time_override; #endif - + } if (eepromBuffer.limits.temperature < 70 || eepromBuffer.limits.temperature > 140) { eepromBuffer.limits.temperature = 255; }