eliminate char variabe
This commit is contained in:
parent
c34fbf9ff6
commit
98dfee90fa
@ -140,34 +140,33 @@ void WatchFaceGravel::Refresh() {
|
||||
if (currentDate.IsUpdated()) {
|
||||
Controllers::DateTime::Days dayOfWeek = dateTimeController.DayOfWeek();
|
||||
lv_label_set_text_fmt(labelDate, "%s %d %s", dateTimeController.DayOfWeekShortToStringLow(dayOfWeek), dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
char dayChar = ' ';
|
||||
switch(dateTimeController.DayOfWeek()) {
|
||||
case (Controllers::DateTime::Days::Sunday):
|
||||
dayChar = 'S';
|
||||
lv_label_set_text_fmt(labelDate, "S %d %s", dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Monday):
|
||||
dayChar = 'M';
|
||||
lv_label_set_text_fmt(labelDate, "M %d %s", dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Tuesday):
|
||||
dayChar = 'T';
|
||||
lv_label_set_text_fmt(labelDate, "T %d %s", dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Wednesday):
|
||||
dayChar = 'W';
|
||||
lv_label_set_text_fmt(labelDate, "W %d %s", dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Thursday):
|
||||
dayChar = 'R';
|
||||
lv_label_set_text_fmt(labelDate, "R %d %s", dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Friday):
|
||||
dayChar = 'F';
|
||||
lv_label_set_text_fmt(labelDate, "F %d %s", dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Saturday):
|
||||
dayChar = 'A';
|
||||
lv_label_set_text_fmt(labelDate, "A %d %s", dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
lv_label_set_text_fmt(labelDate, "%c %d %s", dayChar, dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
//lv_label_set_text_fmt(labelDate, "%c %d %s", dayChar, dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
}
|
||||
lv_obj_realign(labelDate);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user