Skip to content

Commit

Permalink
Merge pull request #36 from miguelestevez/patch-1
Browse files Browse the repository at this point in the history
Update Ticker.cpp
  • Loading branch information
sstaub authored Mar 25, 2021
2 parents 86327e5 + 84fb67a commit 49b2d05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Ticker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ bool Ticker::tick() {
uint32_t currentTime = (resolution == MILLIS) ? millis() : micros();
if ((currentTime - lastTime) >= timer) {
lastTime = currentTime;
if (repeat - counts == 1 && counts != 0xFFFFFFFF) enabled = false;
if (repeat - counts == 1 && counts != 0xFFFFFFFF) {
enabled = false;
status = STOPPED;
}
counts++;
return true;
}
Expand Down

0 comments on commit 49b2d05

Please sign in to comment.