Skip to content

Commit

Permalink
relay: fixup stm relay change delay
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Dec 9, 2021
1 parent 1b27fa5 commit 26d28db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/espurna/relay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,12 +932,12 @@ class StmProvider : public RelayProviderBase {
}

void boot(bool) override {
// XXX: this was part of the legacy implementation
// "because of broken stm relay firmware"
_relays[_id].change_delay = 3000 + 1000 * _id;
// XXX: does this actually help with anything? remains as part of the
// original implementation, quoting "because of broken stm relay firmware"
_relays[_id].change_delay = espurna::duration::Seconds(3) + espurna::duration::Seconds(1) * _id;
}

void change(bool status) {
void change(bool status) override {
Serial.flush();
Serial.write(0xA0);
Serial.write(_id + 1);
Expand Down

0 comments on commit 26d28db

Please sign in to comment.