mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
fix pwm ESP32
This commit is contained in:
parent
6b51203b3b
commit
816cbcafe1
@ -4245,10 +4245,14 @@ int16_t Run_script_sub(const char *type, int8_t tlen, JsonParserObject *jo) {
|
||||
lp += 3;
|
||||
uint8_t channel = 1;
|
||||
if (*(lp+1)=='(') {
|
||||
channel = *lp & 7;
|
||||
if (channel > 5) {
|
||||
channel = 5;
|
||||
}
|
||||
channel = *lp & 0x0f;
|
||||
#ifdef ESP8266
|
||||
if (channel > 5) {channel = 5;}
|
||||
#endif // ESP8266
|
||||
#ifdef ESP32
|
||||
if (channel > 8) {channel = 8;}
|
||||
#endif // ESP32
|
||||
if (channel < 1) {channel = 1;}
|
||||
lp += 2;
|
||||
} else {
|
||||
if (*lp=='(') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user