From f70acbddc4c33930bce5f05d0031ae139300f99a Mon Sep 17 00:00:00 2001 From: Bertrand Lemasle Date: Wed, 5 Dec 2018 20:54:59 +1300 Subject: [PATCH] Fixed readAlarm1 override not unpacking time --- src/RtcAbstraction.cpp | 1 + src/RtcAbstraction.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/RtcAbstraction.cpp b/src/RtcAbstraction.cpp index b3ece36..11cbe04 100644 --- a/src/RtcAbstraction.cpp +++ b/src/RtcAbstraction.cpp @@ -35,6 +35,7 @@ boolean MD_DS3231_Ext::writeTime(const tmElements_t &time) { boolean MD_DS3231_Ext::readAlarm1(almType_t &almType, tmElements_t &time) { almType = MD_DS3231::getAlarm1Type(); bool result = MD_DS3231::readAlarm1(); + unpack(time); return result; } diff --git a/src/RtcAbstraction.h b/src/RtcAbstraction.h index ff5a6e1..00ceeee 100644 --- a/src/RtcAbstraction.h +++ b/src/RtcAbstraction.h @@ -12,6 +12,7 @@ #define RTC_A_CLASS uDS3231 #define WRITE_ALARM_1(t) RTC_A.writeAlarm1(DS3231_ALM_HMS, t) + #define READ_ALARM_1(t) almType_t almDummy; RTC_A.readAlarm1(almDummy, t) #else #include @@ -39,4 +40,5 @@ #define RTC_A_CLASS MD_DS3231_Ext #define WRITE_ALARM_1(t) RTC_A.writeAlarm1(DS3231_ALM_HMS, t) + #define READ_ALARM_1(t) almType_t almDummy; RTC_A.readAlarm1(almDummy, t) #endif \ No newline at end of file