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:
parent
1b8c7e34f9
commit
2a7e509978
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user