Add the option to see if a Power on Reset has taken place and the RTC data is NOT valid.
Add the option to see if a Power on Reset has taken place and the RTC data is NOT valid. Upon a program start it is useful to detect whether the RTC data is valid (or Not). With the following changes this is possible.
- Add the variable bool timeUpdateRequired = true; to tyhe .h file.
- In the .cpp file add this line before the return: timeUpdateRequired = readBit(RV3028_STATUS, STATUS_PORF); In that way as soon as the RTC.begin is initiated the variable RTC.timeUpdateRequired can investigated to see if the date/time needs setting on the 3028.
Which two files?
From: Constantin Koch @.> Sent: 09 February 2024 16:29 To: constiko/RV-3028_C7-Arduino_Library @.> Cc: bricomp @.>; Author @.> Subject: Re: [constiko/RV-3028_C7-Arduino_Library] Add the option to see if a Power on Reset has taken place and the RTC data is NOT valid. (PR #12)
@constiko requested changes on this pull request.
Thanks Robert! Could you remove the two extra source files?
— Reply to this email directly, view it on GitHub https://github.com/constiko/RV-3028_C7-Arduino_Library/pull/12#pullrequestreview-1872780874 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXOXC77PR6IBLKOLSG6FMDYSZFE3AVCNFSM6AAAAABDBTFOPCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNZSG44DAOBXGQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AAXOXC6B4DJAIEWBDP3Z3EDYSZFE3A5CNFSM6AAAAABDBTFOPCWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTTPUBPEU.gif Message ID: @.*** @.***> >
I think I have got it now!Sent from Outlook for Android