Browse Source

LED: store default settings exactly once (#1719, #1724)

rules-rpn
Max Prokhorov 5 years ago
committed by GitHub
parent
commit
aac2e1e47e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      code/espurna/led.ino

+ 2
- 2
code/espurna/led.ino View File

@ -187,9 +187,9 @@ void ledSetup() {
#endif #endif
for (unsigned int i=0; i < _leds.size(); i++) { for (unsigned int i=0; i < _leds.size(); i++) {
if (!hasSetting("ledMode", i)) setSetting("ledMode", i, _leds[i].mode);
if (!hasSetting("ledRelay", i)) setSetting("ledRelay", i, _leds[i].relay);
pinMode(_leds[i].pin, OUTPUT); pinMode(_leds[i].pin, OUTPUT);
setSetting("ledMode", i, _leds[i].mode);
setSetting("ledRelay", i, _leds[i].relay);
_ledStatus(i, false); _ledStatus(i, false);
} }


Loading…
Cancel
Save