Skip to content

Commit

Permalink
Fix long Ticker period conversion: cast ms to uint64_t when calculati…
Browse files Browse the repository at this point in the history
…ng us (#3175)

* Fix long Ticker period conversion

* Simplify long Ticker period conversion fix by using 1000ULL
  • Loading branch information
full-stack-ex authored and me-no-dev committed Sep 5, 2019
1 parent 1b8c7e3 commit 2a7e509
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/Ticker/src/Ticker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ void Ticker::_attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t
}
esp_timer_create(&_timerConfig, &_timer);
if (repeat) {
esp_timer_start_periodic(_timer, milliseconds * 1000);
esp_timer_start_periodic(_timer, milliseconds * 1000ULL);
} else {
esp_timer_start_once(_timer, milliseconds * 1000);
esp_timer_start_once(_timer, milliseconds * 1000ULL);
}
}

Expand Down

0 comments on commit 2a7e509

Please sign in to comment.