summaryrefslogtreecommitdiff
path: root/src/components/timer
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-04-16 05:19:28 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-04-16 05:20:22 (GMT)
commit1d48a97f09104e6b26159622d1631c781498e6f3 (patch)
treed3ce694b3e79549d7c2bccb975b308273410f536 /src/components/timer
parentc92fdb2e8cec3c581124c5efcfb5297ac4cfdcb5 (diff)
replace pdMS_TO_TICKS with APP_TIMER_TICKS; more tweaks
Diffstat (limited to 'src/components/timer')
-rw-r--r--src/components/timer/TimerController.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/timer/TimerController.cpp b/src/components/timer/TimerController.cpp
index 1988094..115aa27 100644
--- a/src/components/timer/TimerController.cpp
+++ b/src/components/timer/TimerController.cpp
@@ -24,7 +24,7 @@ void TimerController::Init() {
void TimerController::StartTimer(uint32_t duration) {
xTimerStop(timerAppTimer,0);
auto currentTicks = xTaskGetTickCount();
- TickType_t durationTicks = pdMS_TO_TICKS(duration);
+ TickType_t durationTicks = APP_TIMER_TICKS(duration);
xTimerChangePeriod(timerAppTimer, durationTicks, 0);
xTimerStart(timerAppTimer, 0);
endTicks = currentTicks + durationTicks;