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
static char Mmm[] PROGMEM = "JanFebMarAprMayJunJulAugSepOctNovDec";
static const char Mmm[] PROGMEM = "JanFebMarAprMayJunJulAugSepOctNovDec";
//------------------------------------------------------------------------------
// convert Mmm string to [0,12]
static uint8_t c2m(const char* s) {
@ -96,7 +96,7 @@ void DateTime::printDateTime(Print* pr) const {
* \param[in] pr Print stream.
*/
void DateTime::printDdd(Print* pr) const {
static char Ddd[] PROGMEM = "SunMonTueWedThuFriSat";
static const char Ddd[] PROGMEM = "SunMonTueWedThuFriSat";
char buf[4];
uint8_t w = dayOfWeek();
strncpy_P(buf, &Ddd[3*w], 3);
@ -437,4 +437,4 @@ bool RTC_DS1307::write(uint8_t address, uint8_t *buf, uint8_t count) {
i2cBus_->stop();
return false;
}
#endif // DS_RTC_USE_WIRE
#endif // DS_RTC_USE_WIRE