Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTC Superclass #215

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
cb0bf8d
Wrote `isLeapYear()` function
Jul 30, 2020
0af4be5
Wrote `fixDateTime()` method to fix invalid DateTime objects
Jul 30, 2020
6f49b2b
Write additional comment specifying that if DateTime is already valid,
Jul 30, 2020
bca61c2
Merge pull request #1 from Harrison-O/DateTime_eqaulity
Harrison-O Jul 30, 2020
ba9c0ed
Merge pull request #2 from Harrison-O/fixDateTime
Harrison-O Jul 30, 2020
ae82978
Merge pull request #3 from adafruit/master
Harrison-O Dec 28, 2020
dded178
Merge pull request #4 from Harrison-O/master
Harrison-O Dec 28, 2020
7654480
Wrote RTC superclass
Dec 28, 2020
e3757d3
Modified RTClib.h to use RTC.h
Dec 28, 2020
9dfa49b
Fixed IDE errors
Dec 28, 2020
00075a4
Fixed compile errors
Dec 28, 2020
eaec406
Moved _I2C_WRITE and _I2C_READ to RTClib.cpp
Dec 29, 2020
68bed44
Wrote new keywords
Dec 29, 2020
54fcd63
Fixed usage of millisPerSecond and RTC_Millis::adjustDrift()
Dec 29, 2020
2b98009
Updated doxygen comments for adjustDrift()
Dec 29, 2020
4a25373
Wrote second `begin()` function for RTC classes
Dec 29, 2020
c1001bc
Wrote adjustDraft() functions for RTC classes
Dec 29, 2020
f00f0af
Removed adjustDrift() for future pull request
Dec 29, 2020
58e5432
Made RTC superclass public for subclasses
Dec 29, 2020
1614120
Fixed compile error with begin(const DateTime&)
Dec 29, 2020
de9a42e
Removed fixDateTime() function
Dec 29, 2020
189ddc9
Fixed file placement in utility folder
Dec 29, 2020
0975cc5
Ensured that TimeSpan.h file includes Arduino.h
Dec 29, 2020
3ab7669
Removed COMPILE_DT constant due to compile error
Dec 29, 2020
3721491
Removed adjustDrift() from RTC for future pull request
Dec 29, 2020
290bea2
Fixed build errors
Dec 29, 2020
41b522d
Fixed adjustDrift() for RTC_Millis
Dec 30, 2020
2f99da8
Fixed micro to milli typo
Dec 31, 2020
edc0af4
Fixed clang formatting issues
Dec 31, 2020
fd67d34
Wrote adjustDrift() back in to enforce consistency
Dec 31, 2020
80b5650
:w
Dec 31, 2020
7213586
Fixed clang formatting issues
Dec 31, 2020
5eba8f6
Removed millisPerSecond from RTC_Millis
Dec 31, 2020
db255bf
Fixed compile error involving millisPerSecond
Jan 1, 2021
e2a981c
Renamed RTC_Super to RTC to find RTC macro
Jan 1, 2021
8f7e656
Changed begin(DateTime&) to non-pure virtual
Jan 2, 2021
c13d1c4
Renamed RTC_Super to RTC_Base
Jan 2, 2021
56f3426
Changed begin(void) method for pseudo RTCs
Jan 2, 2021
678f814
Updated doxygen comment
Jan 2, 2021
2e664b4
Renamed RTC_Base to RealTimeClock
Jan 3, 2021
3151cf7
Wrote note for RealTimeClock class
Jan 3, 2021
b8d8b77
Changed ppm to non-const
Jan 3, 2021
266cc68
Made lostPower() virtual in base class
Jan 4, 2021
84fbf61
Commented out adjustDrift() for future versions
Jan 4, 2021
ad85753
Fixed clang formatting issue
Jan 5, 2021
5cee6ba
Fixed clang formatting issue
Jan 5, 2021
a5a037d
Fixed clang formatting issue
Jan 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Renamed RTC_Base to RealTimeClock
Harrison-O committed Jan 3, 2021
commit 2e664b4ac899e745be6e0f0a6cef71a161ee2dfc
12 changes: 6 additions & 6 deletions RTClib.h
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ enum Ds1307SqwPinMode {
@brief RTC based on the DS1307 chip connected via I2C and the Wire library
*/
/**************************************************************************/
class RTC_DS1307 : public RTC {
class RTC_DS1307 : public RealTimeClock {
public:
boolean begin(void);
boolean begin(const DateTime &dt);
@@ -128,7 +128,7 @@ enum Ds3231Alarm2Mode {
@brief RTC based on the DS3231 chip connected via I2C and the Wire library
*/
/**************************************************************************/
class RTC_DS3231 : public RTC {
class RTC_DS3231 : public RealTimeClock {
public:
boolean begin(void);
boolean begin(const DateTime &dt);
@@ -195,7 +195,7 @@ enum Pcf8523OffsetMode {
@brief RTC based on the PCF8523 chip connected via I2C and the Wire library
*/
/**************************************************************************/
class RTC_PCF8523 : public RTC {
class RTC_PCF8523 : public RealTimeClock {
public:
boolean begin(void);
boolean begin(const DateTime &dt);
@@ -233,7 +233,7 @@ enum Pcf8563SqwPinMode {
*/
/**************************************************************************/

class RTC_PCF8563 : public RTC {
class RTC_PCF8563 : public RealTimeClock {
public:
boolean begin(void);
boolean begin(const DateTime &dt);
@@ -253,7 +253,7 @@ class RTC_PCF8563 : public RTC {
use. NOTE: this is immune to millis() rollover events.
*/
/**************************************************************************/
class RTC_Millis : public RTC {
class RTC_Millis : public RealTimeClock {
public:
boolean begin(void);
boolean begin(const DateTime &dt);
@@ -286,7 +286,7 @@ class RTC_Millis : public RTC {
approximately 71.6 minutes.
*/
/**************************************************************************/
class RTC_Micros : public RTC {
class RTC_Micros : public RealTimeClock {
public:
boolean begin(void);
boolean begin(const DateTime &dt);
2 changes: 1 addition & 1 deletion keywords.txt
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

DateTime KEYWORD1
TimeSpan KEYWORD1
RTC_Super KEYWORD1
RealTimeClock KEYWORD1
RTC_DS1307 KEYWORD1
RTC_DS3231 KEYWORD1
RTC_PCF8523 KEYWORD1
8 changes: 4 additions & 4 deletions utility/RTC_Base.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/*!
@file RTC_Super.h
@file RTC_Base.h

Original library by JeeLabs http://news.jeelabs.org/code/, released to the
public domain
@@ -19,8 +19,8 @@
*/
/**************************************************************************/

#ifndef _RTC_SUPER_H_
#define _RTC_SUPER_H_
#ifndef _RTC_BASE_H
#define _RTC_BASE_H

#include "DateTime.h"
#include <Arduino.h>
@@ -30,7 +30,7 @@
@brief RTC base class for all RTC chips
*/
/**************************************************************************/
class RTC_Base {
class RealTimeClock {
public:
/*!
@brief Start the RTC while preserving the RTC's date/time