From 430b8b8947611c7572f24b673a9935b1a1356fb0 Mon Sep 17 00:00:00 2001 From: dario Date: Wed, 27 Sep 2023 09:54:40 +0200 Subject: [PATCH] Fixed timer starting --- src/system/watchdog.cpp | 1 + src/timer.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/watchdog.cpp b/src/system/watchdog.cpp index 373b349..1bf582d 100644 --- a/src/system/watchdog.cpp +++ b/src/system/watchdog.cpp @@ -2,6 +2,7 @@ #ifdef STA_RTOS_WATCHDOG_ENABLE #include +#include #include #include #include diff --git a/src/timer.cpp b/src/timer.cpp index 967396d..79c6361 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -12,7 +12,7 @@ namespace sta { running_{false} { // Pass an anonymous function as the callback which will invoke the currently registered callback. - timer_id_ = osTimerNew(timeoutHandler, osTimerOnce, arg, &timer_attr_); + timer_id_ = osTimerNew(timeoutHandler, osTimerOnce, this, &timer_attr_); STA_ASSERT_MSG(timer_id_ != NULL, "Failed to create timer!"); }