Commit 2a7e5099 authored by full-stack-ex's avatar full-stack-ex Committed by Me No Dev

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
parent 1b8c7e34
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment