Browse Source

hack for correctly restoring relay state on boot - because of broken stm firmware

softuart
Maciej Czerniak 6 years ago
parent
commit
8c629ba7ab
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      code/espurna/relay.ino

+ 5
- 1
code/espurna/relay.ino View File

@ -394,7 +394,11 @@ void _relayBoot() {
} }
_relays[i].current_status = !status; _relays[i].current_status = !status;
_relays[i].target_status = status; _relays[i].target_status = status;
_relays[i].change_time = millis();
#ifdef RELAY_PROVIDER_STM
_relays[i].change_time = millis() + 3000 + 1000 * i;
#else
_relays[i].change_time = millis();
#endif
bit <<= 1; bit <<= 1;
} }


Loading…
Cancel
Save