Refactor LedPwm code

This commit is contained in:
Theo Arends 2020-05-23 13:09:16 +02:00
parent dc9ce42888
commit aafa0862ab
2 changed files with 15 additions and 14 deletions

View File

@ -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);
} }