From b946b8d156175309ab778038dab75ec7996c05bc Mon Sep 17 00:00:00 2001 From: "James A. Jerkins" Date: Fri, 3 Dec 2021 19:10:34 -0600 Subject: [PATCH] Fix assertion failure in ButtonHandler FreeRTOS says zero is not a valid value for xTimerPeriodInTicks. Zero value fires an assertion on line 361 in timers.h --- src/buttonhandler/ButtonHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buttonhandler/ButtonHandler.cpp b/src/buttonhandler/ButtonHandler.cpp index 91e8bbd0..02ee22cf 100644 --- a/src/buttonhandler/ButtonHandler.cpp +++ b/src/buttonhandler/ButtonHandler.cpp @@ -8,7 +8,7 @@ void ButtonTimerCallback(TimerHandle_t xTimer) { } void ButtonHandler::Init(Pinetime::System::SystemTask* systemTask) { - buttonTimer = xTimerCreate("buttonTimer", 0, pdFALSE, systemTask, ButtonTimerCallback); + buttonTimer = xTimerCreate("buttonTimer", pdMS_TO_TICKS(200), pdFALSE, systemTask, ButtonTimerCallback); } ButtonActions ButtonHandler::HandleEvent(Events event) {