summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames A. Jerkins <evergreen@jamesjerkinscomputer.com>2021-12-03 19:10:34 -0600
committerJF <JF002@users.noreply.github.com>2021-12-09 21:16:57 +0100
commitb946b8d156175309ab778038dab75ec7996c05bc (patch)
tree5fedbf0599adccc97092eada35cc5272ec121b0e
parentcd593c3862b1cb43865fb9075273dc97dfe5b7f1 (diff)
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
-rw-r--r--src/buttonhandler/ButtonHandler.cpp2
1 files changed, 1 insertions, 1 deletions
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) {