Two strategies to address a stuck buzzer
This commit is contained in:
parent
0ccc5d1dd9
commit
71674059c3
2 changed files with 4 additions and 2 deletions
|
|
@ -124,7 +124,7 @@ class Buzzer {
|
|||
this->state.timestamp = millis() + this->state.tone.duration;
|
||||
if (this->state.tone.frequency > 0) this->on();
|
||||
}
|
||||
else if (millis() >= this->state.timestamp) this->reset();
|
||||
else if (ELAPSED(millis(), this->state.timestamp)) this->reset();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue