Update SoftRTClib.cpp

Update library to support latest versions of Arduino IDE.
This commit is contained in:
brantel 2019-01-07 15:54:30 -05:00 committed by GitHub
parent bdf9408a5d
commit 7fa7f14fcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,7 @@ static uint8_t c2b(const char *s) {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// used by c2m and printMmm // used by c2m and printMmm
static char Mmm[] PROGMEM = "JanFebMarAprMayJunJulAugSepOctNovDec"; static const char Mmm[] PROGMEM = "JanFebMarAprMayJunJulAugSepOctNovDec";
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// convert Mmm string to [0,12] // convert Mmm string to [0,12]
static uint8_t c2m(const char* s) { static uint8_t c2m(const char* s) {
@ -96,7 +96,7 @@ void DateTime::printDateTime(Print* pr) const {
* \param[in] pr Print stream. * \param[in] pr Print stream.
*/ */
void DateTime::printDdd(Print* pr) const { void DateTime::printDdd(Print* pr) const {
static char Ddd[] PROGMEM = "SunMonTueWedThuFriSat"; static const char Ddd[] PROGMEM = "SunMonTueWedThuFriSat";
char buf[4]; char buf[4];
uint8_t w = dayOfWeek(); uint8_t w = dayOfWeek();
strncpy_P(buf, &Ddd[3*w], 3); strncpy_P(buf, &Ddd[3*w], 3);