From 0585ccdfaebb47efb36032683bddd2736feabb66 Mon Sep 17 00:00:00 2001 From: Josh Date: Sat, 21 Oct 2023 23:45:41 -0400 Subject: [PATCH] cleanup code and fix 12hour time on digital face (cherry picked from commit e4b4fba5a18d525c16a2ecdc399b201a1c3cacff) --- src/displayapp/screens/WatchFaceDigital.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index 4e29f15c..62d967f8 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -66,10 +66,6 @@ WatchFaceDigital::WatchFaceDigital(Controllers::DateTime& dateTimeController, lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, 0, 0); - /*label_time_ampm = lv_label_create(lv_scr_act(), nullptr); - lv_label_set_text_static(label_time_ampm, ""); - lv_obj_align(label_time_ampm, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, -30, -55);*/ - heartbeatIcon = lv_label_create(lv_scr_act(), nullptr); lv_label_set_text_static(heartbeatIcon, Symbols::heartBeat); lv_obj_set_style_local_text_color(heartbeatIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xCE1B1B)); @@ -115,16 +111,11 @@ void WatchFaceDigital::Refresh() { uint8_t second = dateTimeController.Seconds(); if (settingsController.GetClockType() == Controllers::Settings::ClockType::H12) { - /*char ampmChar[3] = "AM"; if (hour == 0) { hour = 12; - } else if (hour == 12) { - ampmChar[0] = 'P'; } else if (hour > 12) { hour = hour - 12; - ampmChar[0] = 'P'; } - lv_label_set_text(label_time_ampm, ampmChar);*/ lv_label_set_text_fmt(label_time, "%2d:%02d", hour, minute); lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, 0, 0); } else {