leds: fixed duty cycle calculation