From 659e5051f3017002aaeeeedf9891a68ff4312709 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Fri, 28 Jun 2019 10:06:29 +0100 Subject: [PATCH] Watchdog: fix callback - uses ms --- drivers/Watchdog.cpp | 2 +- drivers/Watchdog.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/Watchdog.cpp b/drivers/Watchdog.cpp index 3d1422fb9f..c1172f20cd 100644 --- a/drivers/Watchdog.cpp +++ b/drivers/Watchdog.cpp @@ -93,7 +93,7 @@ void Watchdog::timeout_handler() { kick(); if (_callback) { - _callback(_ticker_timeout); + _callback(_ticker_timeout / 1000); } } diff --git a/drivers/Watchdog.h b/drivers/Watchdog.h index 1ebf8dfb84..3693d6a6a8 100644 --- a/drivers/Watchdog.h +++ b/drivers/Watchdog.h @@ -69,7 +69,7 @@ public: * * If watchdog is already running, only callback is being updated (timeout can't be set to watchdog neither ticker). * - * @param func Callback to be invoked after timeout + * @param func Callback to be invoked after timeout, it has the argument - time elapsed in milliseconds * @param timeout Ticker timeout to be kicking the watchdog * * @return status true if the watchdog timer was started