Makuna / Rtc

Arduino Library for RTCs, Ds1302, Ds1307, Ds3231, Ds3232, Ds3234 and Pcf8563/BM8563 with deep support. Please refer to the Wiki for more details. Please use the Github Discussions to ask questions as the GitHub Issues feature is used for bug tracking.
GNU Lesser General Public License v3.0
368 stars 126 forks source link

Check the status of the alarm #114

Closed DVB-Arduino closed 4 years ago

DVB-Arduino commented 4 years ago

In the Jarzebski RTC library there is a function to check the status of the alarm - it is charged or worked. I did not find this in your library. If possible, please add.

Makuna commented 4 years ago

Please include more information when you create issues. What RTC module?

DS3231AlarmFlag LatchAlarmsTriggeredFlags()

This will reset the current alarm flags and return the status of the alarms. Is this what you mean?

DVB-Arduino commented 4 years ago

Sorry. DS3231 module. My device must be turned off for transportation. But the watch runs on battery power autonomously. When I turn on the device, I do not know if the alarm worked while the device was turned off. So I need a function that tells me if the alarm worked or not. But I do not need to reset the set alarm, as in DS3231AlarmFlag LatchAlarmsTriggeredFlags ().

Makuna commented 4 years ago

What is your use case that this won't work for you?

The latching means the alarm can trigger again. Just checking means it happened once in the past but if it did happen you won't know if it happens again after you check. Further, the interrupt features won't trigger again unless you reset/latch them.

DVB-Arduino commented 4 years ago

Thank you very much. This does not work as I thought. I'll think about how to set an alarm when I turn on the device. And yes, your library is cool!

Makuna commented 4 years ago

Not exactly clear on your response, but it seems the issue is resolved.