We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 486422c commit bb0d406Copy full SHA for bb0d406
src/components/ledc/ws_ledc.cpp
@@ -54,8 +54,8 @@ bool ws_ledc::analogWrite(uint8_t pin, int value) {
54
55
// Calculate duty cycle for the `value` passed in
56
// (assumes 12-bit resolution, 2^12)
57
- //uint32_t dutyCycle = (4095 / 255) * min(value, 255);
58
- uint32_t dutyCycle =(uint32_t)(((double)4095 / 255.0) * min((uint32_t)value, (uint32_t)255));
+ uint32_t dutyCycle =
+ (uint32_t)(((double)4095 / 255.0) * min((uint32_t)value, (uint32_t)255));
59
60
// Call duty cycle write
61
return setDuty(pin, dutyCycle);
0 commit comments