Fixing initial value of hour_adjusted
This commit is contained in:
parent
d846cb1b74
commit
0b1bec0ae9
@ -103,7 +103,7 @@ void WatchFaceAccurateWords::Refresh() {
|
|||||||
uint8_t hour = time.hours().count();
|
uint8_t hour = time.hours().count();
|
||||||
uint8_t minute = time.minutes().count();
|
uint8_t minute = time.minutes().count();
|
||||||
|
|
||||||
uint8_t hour_adjusted = time.hours().count();
|
uint8_t hour_adjusted;
|
||||||
char words[78];
|
char words[78];
|
||||||
char part_day[20];
|
char part_day[20];
|
||||||
const char hour_word_array[26][10] = {
|
const char hour_word_array[26][10] = {
|
||||||
@ -145,9 +145,13 @@ void WatchFaceAccurateWords::Refresh() {
|
|||||||
if (displayedHour != hour || displayedMinute != minute) {
|
if (displayedHour != hour || displayedMinute != minute) {
|
||||||
displayedHour = hour;
|
displayedHour = hour;
|
||||||
displayedMinute = minute;
|
displayedMinute = minute;
|
||||||
|
|
||||||
if(minute>32) {
|
if(minute>32) {
|
||||||
hour_adjusted = (hour+1) % 24;
|
hour_adjusted = (hour+1) % 24;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
hour_adjusted = hour;
|
||||||
|
}
|
||||||
|
|
||||||
if (hour_adjusted != 0 && hour_adjusted != 12) {
|
if (hour_adjusted != 0 && hour_adjusted != 12) {
|
||||||
sprintf(part_day, "%s", part_day_word_array[hour_adjusted/3]);
|
sprintf(part_day, "%s", part_day_word_array[hour_adjusted/3]);
|
||||||
|
Loading…
Reference in New Issue
Block a user