From 34769ac25164c98fe55d1da85662e9bd5823719e Mon Sep 17 00:00:00 2001 From: anschrammh Date: Thu, 31 Oct 2019 21:44:21 +0100 Subject: [PATCH] Added new getTemperature method in order to read the internal temp of the DS3231 RTC chip --- src/app/RtcManager.cpp | 4 ++++ src/app/RtcManager.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/app/RtcManager.cpp b/src/app/RtcManager.cpp index 1512a62..35c7ad5 100644 --- a/src/app/RtcManager.cpp +++ b/src/app/RtcManager.cpp @@ -31,3 +31,7 @@ boolean RtcManager::hasLostPower() const return _rtcRef.lostPower(); } +float RtcManager::getTemperature() const +{ + return _rtcRef.getTemperature(); +} diff --git a/src/app/RtcManager.h b/src/app/RtcManager.h index 0ac056e..8fded85 100644 --- a/src/app/RtcManager.h +++ b/src/app/RtcManager.h @@ -11,6 +11,7 @@ class RtcManager void setTime(const DateTime dateTime); void setDateTime(const DateTime dateTime); boolean hasLostPower() const; + float getTemperature() const; protected: RtcManager(RTC_DS3231 &rtc); private: