mirror of https://github.com/arendst/Tasmota.git
Add PWM Freq Limits Config at Compile time
This commit is contained in:
parent
dfce7a280a
commit
efb328de09
|
@ -914,7 +914,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
|
|||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data);
|
||||
}
|
||||
else if (CMND_PWMFREQUENCY == command_code) {
|
||||
if ((1 == payload) || ((payload >= 100) && (payload <= 4000))) {
|
||||
if ((1 == payload) || ((payload >= PWM_MIN) && (payload <= PWM_MAX))) {
|
||||
Settings.pwm_frequency = (1 == payload) ? PWM_FREQ : payload;
|
||||
analogWriteFreq(Settings.pwm_frequency); // Default is 1000 (core_esp8266_wiring_pwm.c)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue