Skip to content
Snippets Groups Projects
Commit 21f4f60f authored by Alberto Nidasio's avatar Alberto Nidasio
Browse files

[PWM] Fixed getDutyCycle function

parent e85df056
No related branches found
No related tags found
No related merge requests found
......@@ -84,8 +84,8 @@ void PWM::setDutyCycle(TimerUtils::Channel channel, float dutyCycle)
float PWM::getDutyCycle(TimerUtils::Channel channel)
{
return static_cast<float>(timer.readCaptureCompareRegister(channel) /
timer.readAutoReloadRegister());
return static_cast<float>(timer.readCaptureCompareRegister(channel)) /
static_cast<float>(timer.readAutoReloadRegister());
}
void PWM::setTimerConfiguration()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment