Naguissa / uRTCLib

Really tiny library to basic RTC functionality on Arduino. DS1307, DS3231 and DS3232 RTCs are supported.
https://www.foroelectro.net/librerias-arduino-ide-f29/rtclib-arduino-libreria-simple-y-eficaz-para-rtc-y-t95.html
GNU Lesser General Public License v3.0
87 stars 24 forks source link

alarmDisable() only works with URTCLIB_ALARM_1 #25

Closed derbic7 closed 2 years ago

derbic7 commented 2 years ago

Hello, My question is that alarmDisable() only works for URTCLIB_ALARM_1. I think the problem is in the following lines of code in uRTClib.cpp inside the mentioned function: ... status &= 0b11111110; // A1IE bit ...

Which could be according to: .. status &= mask; ...

Also, Then I think you should also update the flag according to: _a2_mode = URTCLIB_ALARM_TYPE_2_NONE;

Thank you for your work and greetings

Naguissa commented 2 years ago

It's just as you said; fixed and created a new 6.5.0 release.

I just become COVID positive last Friday, that's why I was so slow applying the changes....

derbic7 commented 2 years ago

Thanks for the job. If you allow me a suggestion, it would be nice to implement a function to read "Alarm Flag 'A1F' and 'A2F' bit" that allows checking if a certain alarm has been triggered, in case I don't want to use an interrupt or read the pin connected to INT/SQW. Something like, for example: 'alarmTriggered(const uint8_t alarm)' . Thanks again and greetings.

El 04/04/2022 11:42 Naguissa @.***> escribió:

Closed #25 https://github.com/Naguissa/uRTCLib/issues/25.

— Reply to this email directly, view it on GitHub https://github.com/Naguissa/uRTCLib/issues/25#event-6361473394, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARZCYLFHXHR5WGTHVIGYLM3VDK2RHANCNFSM5SDJ7NCQ. You are receiving this because you authored the thread. https://github.com/notifications/beacon/ARZCYLBHI3MELUOW4ZEBPTLVDK2RHA5CNFSM5SDJ7NC2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGPAAAAAAL3FRQXE.gifMessage ID: @.***>

Naguissa commented 2 years ago

Thanks, it's a good idea. something like alarmStatus(alarm [1, 2 or any], refresh = true).

It seems we have new release soon....

Cheers!

Naguissa commented 2 years ago

New release with that functionality: https://github.com/Naguissa/uRTCLib/releases/tag/6.6.0

Also, 32K output pin functionality and performance improvements.

derbic7 commented 2 years ago

Fantastic, you have incorporated the changes in a very short period of time! Thank you very much for your effort.

El 08/04/2022 11:56 Naguissa @.***> escribió:

New release with that functionality: https://github.com/Naguissa/uRTCLib/releases/tag/6.6.0

Also, 32K output pin functionality and performance improvements.

— Reply to this email directly, view it on GitHub https://github.com/Naguissa/uRTCLib/issues/25#issuecomment-1092688019, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARZCYLFEC3C3RQLFQTQ7ULDVD77EDANCNFSM5SDJ7NCQ. You are receiving this because you authored the thread. https://github.com/notifications/beacon/ARZCYLGYBOXXD3WAC7LREGTVD77EDA5CNFSM5SDJ7NC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIEQRREY.gifMessage ID: @.***>