mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 23:07:17 +00:00
Refactor LedPwm code
This commit is contained in:
parent
dc9ce42888
commit
aafa0862ab
@ -404,7 +404,8 @@ void SetLedLink(uint32_t state)
|
|||||||
uint32_t led_inv = ledlnk_inverted;
|
uint32_t led_inv = ledlnk_inverted;
|
||||||
if (99 == led_pin) { // Legacy - LED1 is status
|
if (99 == led_pin) { // Legacy - LED1 is status
|
||||||
SetLedPowerIdx(0, state);
|
SetLedPowerIdx(0, state);
|
||||||
} else if (led_pin < 99) {
|
}
|
||||||
|
else if (led_pin < 99) {
|
||||||
if (state) { state = 1; }
|
if (state) { state = 1; }
|
||||||
digitalWrite(led_pin, (led_inv) ? !state : state);
|
digitalWrite(led_pin, (led_inv) ? !state : state);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user