Fix long Ticker period conversion: cast ms to uint64_t when calculating us (#3175)

* Fix long Ticker period conversion

* Simplify long Ticker period conversion fix by using 1000ULL
This commit is contained in:
full-stack-ex 2019-09-05 11:34:47 +04:00 committed by Me No Dev
parent 1b8c7e34f9
commit 2a7e509978

View File

@ -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);
}
}