diff --git a/Source/FanControl.cpp b/Source/FanControl.cpp index b7919a4..75160d3 100644 --- a/Source/FanControl.cpp +++ b/Source/FanControl.cpp @@ -23,7 +23,7 @@ extern "C" void TIM14_IRQHandler(void) } extern "C" void FanControl_SetDuty(uint32_t d) { - duty = TIMER_RELOAD_VALUE / 100UL * d; + duty = TIMER_RELOAD_VALUE * d / 100UL ; } namespace ElektronischeLast { @@ -127,6 +127,6 @@ namespace ElektronischeLast */ std::uint32_t FanControl::get_speed(void) { - return fan_speed *60UL / 2UL; + return fan_speed * 60UL / 2UL; } }