diff --git a/libraries/RTC/examples/AlarmClock/FrontScreen.cpp b/libraries/RTC/examples/AlarmClock/FrontScreen.cpp index 43c5619e..bc10fc8f 100644 --- a/libraries/RTC/examples/AlarmClock/FrontScreen.cpp +++ b/libraries/RTC/examples/AlarmClock/FrontScreen.cpp @@ -70,6 +70,10 @@ void FrontScreenField::enterField(bool reverse) updateAlarm(); } +const char *days[] = { + "Mon, ", "Tue, ", "Wed, ", "Thu, ", "Fri, ", "Sat, ", "Sun, " +}; + const char *months[] = { " Jan ", " Feb ", " Mar ", " Apr ", " May ", " Jun ", " Jul ", " Aug ", " Sep ", " Oct ", " Nov ", " Dec " @@ -184,6 +188,7 @@ void FrontScreenField::set24HourMode(bool value) void FrontScreenField::updateDate() { lcd()->setCursor(0, 0); + lcd()->write(days[RTC::dayOfWeek(&_date) - 1]); if (_date.day < 10) { lcd()->write('0' + _date.day); } else { @@ -231,14 +236,16 @@ void FrontScreenField::updateTime() void FrontScreenField::updateVoltage() { - lcd()->setCursor(15, 0); + lcd()->setCursor(15, 1); lcd()->write(_batteryBars); +/* lcd()->setCursor(12, 1); lcd()->write('0' + _voltageTrunc / 10); lcd()->write('.'); lcd()->write('0' + _voltageTrunc % 10); lcd()->write('v'); +*/ } #endif @@ -246,9 +253,9 @@ void FrontScreenField::updateVoltage() void FrontScreenField::updateAlarm() { #ifdef USE_VOLTAGE_MONITOR - lcd()->setCursor(13, 0); + lcd()->setCursor(13, 1); #else - lcd()->setCursor(14, 0); + lcd()->setCursor(14, 1); #endif lcd()->write(_alarmMode != AlarmOff ? IND_ALARM_ACTIVE1 : ' '); lcd()->write(_alarmMode != AlarmOff ? IND_ALARM_ACTIVE2 : ' '); diff --git a/libraries/RTC/examples/AlarmClock/SetDate.cpp b/libraries/RTC/examples/AlarmClock/SetDate.cpp index dfe19034..54214e43 100644 --- a/libraries/RTC/examples/AlarmClock/SetDate.cpp +++ b/libraries/RTC/examples/AlarmClock/SetDate.cpp @@ -112,6 +112,7 @@ void SetDate::updateCurrentDate() } } +extern const char *days[]; // Table of day names; e.g. "Mon, ". extern const char *months[]; // Table of month names; e.g. " Jan ". void SetDate::printDate() @@ -121,6 +122,8 @@ void SetDate::printDate() int monthCol; int yearCol; int col = 0; + lcd()->write(days[RTC::dayOfWeek(&_value) - 1]); + col += 5; dayCol = col; if (_value.day < 10) { lcd()->write('0' + _value.day);