revert numerical static_cast to C style casts

As per https://github.com/madcowswe/ODrive/pull/410#discussion_r427725994
This commit is contained in:
Samuel Sadok
2020-05-20 13:26:14 +02:00
parent 3d07325022
commit b3912d58c2
5 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -647,7 +647,7 @@ void update_brake_current() {
return;
}
int high_on = static_cast<int>(TIM_APB1_PERIOD_CLOCKS * (1.0f - brake_duty));
int high_on = (int)(TIM_APB1_PERIOD_CLOCKS * (1.0f - brake_duty));
int low_off = high_on - TIM_APB1_DEADTIME_CLOCKS;
if (low_off < 0) low_off = 0;
safety_critical_apply_brake_resistor_timings(low_off, high_on);