diff options
author | Riku Isokoski <riksu9000@gmail.com> | 2021-08-03 12:16:40 +0300 |
---|---|---|
committer | Riku Isokoski <riksu9000@gmail.com> | 2021-08-03 12:16:40 +0300 |
commit | 10b5d30ec31fcd98343eee46c135659004fae19f (patch) | |
tree | caae74e1dd3b1eec1c6c6376cb7760d03f6992a9 /src/displayapp/screens/PineTimeStyle.cpp | |
parent | fc93bdbbbac9b19530db18f17817ffe2c17260c4 (diff) | |
parent | 514481ef7f9c71ad816b31d979c6ab39ce9380dd (diff) |
Merge branch 'develop' into refresh_rework
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 c595223a..5ec2e981 100644 --- a/src/displayapp/screens/PineTimeStyle.cpp +++ b/src/displayapp/screens/PineTimeStyle.cpp @@ -268,23 +268,23 @@ void 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]) { @@ -296,9 +296,9 @@ void 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]); |