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

Fix various defects with Alarm function: #13

Closed grepis closed 4 years ago

grepis commented 4 years ago
Naguissa commented 4 years ago

I've also revamped alarm defines to addapt them to more logical order: (being x 0 for Alarm 0, 1 for Alarm 1)

This way we use a common bit description for both alarms.

I've commited the changes but I have very few time these days, could you test it for me? I've tested compilation and basics, but I have no time to test each alarm mode....

Thanks!

grepis commented 4 years ago

Ok, my setup is ready, so I will check tonight or tomorrow.

On Thu, Dec 5, 2019, 4:49 PM Naguissa, notifications@github.com wrote:

I've also revamped alarm defines to addapt them to more logical order: (being x 0 for Alarm 0, 1 for Alarm 1)

  • bit 0 - AxM1 (always 0 on Alarm 2)
  • bit 1 - AxM2
  • bit 2 - AxM3
  • bit 3 - AxM4
  • bit 4 - Ax DT/DY
  • bit 5 - Ax Enabled: 1 = enabled, 0 = disabled
  • bit 6 - Unused, always 0
  • bit 7 - Alarm 1 = 0 / Alarm 2 = 1

This way we use a common bit description for both alarms.

I've commited the changes but I have very few time these days, could you test it for me? I've tested compilation and basics, but I have no time to test each alarm mode....

Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Naguissa/uRTCLib/pull/13?email_source=notifications&email_token=AN6TGGIOLNXMFZUNKIMRIDDQXFZOBA5CNFSM4JVS2T7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGCISUI#issuecomment-562334033, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN6TGGLDLY6T6BSHBB7BV7LQXFZOBANCNFSM4JVS2T7A .

grepis commented 4 years ago

Hi once again,

Did you made any changes to alarmSet?

On Thu, Dec 5, 2019, 4:51 PM Vlad, grepis@gmail.com wrote:

Ok, my setup is ready, so I will check tonight or tomorrow.

On Thu, Dec 5, 2019, 4:49 PM Naguissa, notifications@github.com wrote:

I've also revamped alarm defines to addapt them to more logical order: (being x 0 for Alarm 0, 1 for Alarm 1)

  • bit 0 - AxM1 (always 0 on Alarm 2)
  • bit 1 - AxM2
  • bit 2 - AxM3
  • bit 3 - AxM4
  • bit 4 - Ax DT/DY
  • bit 5 - Ax Enabled: 1 = enabled, 0 = disabled
  • bit 6 - Unused, always 0
  • bit 7 - Alarm 1 = 0 / Alarm 2 = 1

This way we use a common bit description for both alarms.

I've commited the changes but I have very few time these days, could you test it for me? I've tested compilation and basics, but I have no time to test each alarm mode....

Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Naguissa/uRTCLib/pull/13?email_source=notifications&email_token=AN6TGGIOLNXMFZUNKIMRIDDQXFZOBA5CNFSM4JVS2T7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGCISUI#issuecomment-562334033, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN6TGGLDLY6T6BSHBB7BV7LQXFZOBANCNFSM4JVS2T7A .

Naguissa commented 4 years ago

You're right, I missed it. I've revamped it a little, simplifying for DS1307 and rearranging bit4 and DT/DY in order to fit new defines

I've commited new version to master.