diff options
author | Riku Isokoski <riksu9000@gmail.com> | 2021-07-25 19:30:27 +0300 |
---|---|---|
committer | Riku Isokoski <riksu9000@gmail.com> | 2021-07-25 19:30:27 +0300 |
commit | 2e8bc634dcae6e304b8f94e2633644fd55b64450 (patch) | |
tree | 7098aaa514c1f7600447235e21721319bcb33ae7 /src/displayapp/screens/PineTimeStyle.cpp | |
parent | 12b14176ec965f2553e4cad16e291d54704128f3 (diff) | |
parent | 7b75ca591d31ccd8883a1a1ff83cfd271959dbaa (diff) |
Merge branch 'develop' into fit_more_tasks
Diffstat (limited to 'src/displayapp/screens/PineTimeStyle.cpp')
-rw-r--r-- | src/displayapp/screens/PineTimeStyle.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/PineTimeStyle.cpp index 591f3a49..0efb4dc3 100644 --- a/src/displayapp/screens/PineTimeStyle.cpp +++ b/src/displayapp/screens/PineTimeStyle.cpp @@ -264,23 +264,23 @@ bool PineTimeStyle::Refresh() { char hoursChar[3]; char ampmChar[5]; - if (settingsController.GetClockType() == Controllers::Settings::ClockType::H24) { - sprintf(hoursChar, "%02d", hour); - } else { - if (hour == 0 && hour != 12) { - hour = 12; - sprintf(ampmChar, "A\nM"); - } else if (hour == 12 && hour != 0) { - hour = 12; - sprintf(ampmChar, "P\nM"); - } else if (hour < 12 && hour != 0) { - sprintf(ampmChar, "A\nM"); - } else if (hour > 12 && hour != 0) { - hour = hour - 12; - sprintf(ampmChar, "P\nM"); - } - sprintf(hoursChar, "%02d", hour); + if (settingsController.GetClockType() == Controllers::Settings::ClockType::H24) { + sprintf(hoursChar, "%02d", hour); + } else { + if (hour == 0 && hour != 12) { + hour = 12; + sprintf(ampmChar, "A\nM"); + } else if (hour == 12 && hour != 0) { + hour = 12; + sprintf(ampmChar, "P\nM"); + } else if (hour < 12 && hour != 0) { + sprintf(ampmChar, "A\nM"); + } else if (hour > 12 && hour != 0) { + hour = hour - 12; + sprintf(ampmChar, "P\nM"); } + sprintf(hoursChar, "%02d", hour); + } if (hoursChar[0] != displayedChar[0] || hoursChar[1] != displayedChar[1] || minutesChar[0] != displayedChar[2] || minutesChar[1] != displayedChar[3]) { @@ -292,9 +292,9 @@ bool PineTimeStyle::Refresh() { char hourStr[3]; char minStr[3]; - if (settingsController.GetClockType() == Controllers::Settings::ClockType::H12) { + if (settingsController.GetClockType() == Controllers::Settings::ClockType::H12) { lv_label_set_text(timeAMPM, ampmChar); - } + } /* Display the time as 2 pairs of digits */ sprintf(hourStr, "%c%c", hoursChar[0], hoursChar[1]); |