I have two questions on the RTCLib (from Arduino libraries, by Adafruit v 1.2.0).
In the RTCLib.cpp is defined a PROGMEM array called daysinmonth. I also need the days in a month else where in the program. How do I get access to this instance, rather than (re)defining my own?
adwsystems:
I have two questions on the RTCLib (from Arduino libraries, by Adafruit v 1.2.0).
In the RTCLib.cpp is defined a PROGMEM array called daysinmonth. I also need the days in a month else where in the program. How do I get access to this instance, rather than (re)defining my own?
EDIT:
You'd have to add: 'extern const uint8_t daysInMonth[];' to both RTClib.h and your .ino file.
I think you can see an example of the copy constructor in use in the datecalc example:
See how they're copying one DateTime object to another?
An explanation of why it was necessary to define the copy constructor in this case instead of using the implicit one automatically provided by the compiler: