Skip to content

Commit 1bc4e69

Browse files
authored
[PWM] Fix ESP32 LittleFS build PWM GPIO : port#2 is out of range (#4962)
Fixes: #4962
1 parent 8371a84 commit 1bc4e69

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/src/Helpers/Hardware_PWM.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ bool set_Gpio_PWM(int gpio, uint32_t dutyCycle, uint32_t fadeDuration_ms, uint32
214214
return false;
215215
}
216216
portStatusStruct tempStatus;
217+
if (frequency == 0) frequency = 1000;
217218

218219
// FIXME TD-er: PWM values cannot be stored very well in the portStatusStruct.
219220
key = createKey(PLUGIN_GPIO, gpio);

0 commit comments

Comments
 (0)