From 3ada2fb9a998c705af12730155bfa67c09d6ef95 Mon Sep 17 00:00:00 2001 From: Lewis Jackson <> Date: Wed, 31 May 2023 04:21:19 +0300 Subject: [PATCH] Need to init clock for timer to work properly --- src/WatchyRTC.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/WatchyRTC.cpp b/src/WatchyRTC.cpp index 55d25a4..e96812c 100644 --- a/src/WatchyRTC.cpp +++ b/src/WatchyRTC.cpp @@ -13,6 +13,10 @@ WatchyRTC::WatchyRTC() void WatchyRTC::Init() { + tmElements_t tm; + Get(tm, 0); + rtc_pcf.initClock(); + Set(tm); } void WatchyRTC::Get(tmElements_t & tm, int offsetInSeconds)