Skip to content

Commit

Permalink
Merge pull request #131 from am32-firmware/fix/mindutycycle
Browse files Browse the repository at this point in the history
Fix/mindutycycle, do not apply override if driving brake set to 10, only adjust previous set values
  • Loading branch information
AlkaMotors authored Nov 26, 2024
2 parents 6f0240e + 77a3a9c commit 6e233df
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,8 @@ void loadEEpromSettings()
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;
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
Expand All @@ -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;
}
Expand Down

0 comments on commit 6e233df

Please sign in to comment.