Skip to content

Commit

Permalink
fix driving brake regression
Browse files Browse the repository at this point in the history
Do not apply driving brake if set to 10
  • Loading branch information
AlkaMotors committed Nov 17, 2024
1 parent ceca083 commit 012b78a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,11 @@ void loadEEpromSettings()
eepromBuffer.driving_brake_strength = 10;
}

dead_time_override = DEAD_TIME + (150 - (eepromBuffer.driving_brake_strength * 10));
if (dead_time_override > 200) {
dead_time_override = 200;
if(eepromBuffer.driving_brake_strength < 10){
dead_time_override = DEAD_TIME + (150 - (eepromBuffer.driving_brake_strength * 10));
if (dead_time_override > 200) {
dead_time_override = 200;
}
}
min_startup_duty = eepromBuffer.startup_power + dead_time_override;
minimum_duty_cycle = eepromBuffer.startup_power / 2 + dead_time_override;
Expand Down

0 comments on commit 012b78a

Please sign in to comment.