Skip to content

Commit 5de25bd

Browse files
committed
Clean code.
1 parent f17ba7f commit 5de25bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cores/esp8266/core_esp8266_wiring_pwm.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ extern void __analogWriteMode(uint8_t pin, int val, bool openDrain) {
8383
// val: the duty cycle: between 0 (always off) and 255 (always on).
8484
// So if val = 0 we have digitalWrite(LOW), if we have val==range we have digitalWrite(HIGH)
8585
if (_setPWM(pin, val, analogScale)) {
86-
if (val > 0 && val < analogScale) analogMap |= (1 << pin);
86+
if (val > 0 && val < analogScale) {
87+
analogMap |= (1 << pin);
88+
}
8789
} else {
8890
const bool detach = (val == 0 || val == analogScale);
8991
// To go steady LOW or HIGH, let the waveform run into next duty cycle, if any. Then stop.

0 commit comments

Comments
 (0)