diff --git a/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp b/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp index 05689e2e..565d0986 100644 --- a/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp +++ b/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp @@ -145,8 +145,6 @@ WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(Controllers::DateTime& dateTi lv_obj_set_pos(backgroundLabel, 0, 0); lv_label_set_text_static(backgroundLabel, ""); -//Working here - stepIcon = lv_label_create(lv_scr_act(), nullptr); lv_label_set_text_static(stepIcon, Symbols::shoe); lv_obj_set_style_local_text_color(stepIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, color_text); @@ -160,7 +158,7 @@ WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(Controllers::DateTime& dateTi label_seconds = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(label_seconds, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, color_text); lv_label_set_text_static(label_seconds, "0"); - lv_obj_align(label_seconds, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, -5, -2); + lv_obj_align(label_seconds, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, -9, -2); taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); Refresh(); @@ -216,10 +214,11 @@ void WatchFaceCasioStyleG7710::Refresh() { lv_label_set_text_static(notificationIcon, NotificationIcon::GetIcon(notificationState.Get())); } - currentDateTime = std::chrono::time_point_cast(dateTimeController.CurrentDateTime()); + currentDateTime = std::chrono::time_point_cast(dateTimeController.CurrentDateTime()); if (currentDateTime.IsUpdated()) { uint8_t hour = dateTimeController.Hours(); uint8_t minute = dateTimeController.Minutes(); + uint8_t second = dateTimeController.Seconds(); if (settingsController.GetClockType() == Controllers::Settings::ClockType::H12) { char ampmChar[2] = "A"; @@ -238,6 +237,9 @@ void WatchFaceCasioStyleG7710::Refresh() { } lv_obj_realign(label_time); + lv_label_set_text_fmt(label_seconds, "%02d", second); + lv_obj_realign(label_seconds); + currentDate = std::chrono::time_point_cast(currentDateTime.Get()); if (currentDate.IsUpdated()) { const char* weekNumberFormat = "%V"; diff --git a/src/displayapp/screens/WatchFaceCasioStyleG7710.h b/src/displayapp/screens/WatchFaceCasioStyleG7710.h index ccf3c2b8..166ba468 100644 --- a/src/displayapp/screens/WatchFaceCasioStyleG7710.h +++ b/src/displayapp/screens/WatchFaceCasioStyleG7710.h @@ -42,7 +42,7 @@ namespace Pinetime { Utility::DirtyValue powerPresent {}; Utility::DirtyValue bleState {}; Utility::DirtyValue bleRadioEnabled {}; - Utility::DirtyValue> currentDateTime {}; + Utility::DirtyValue> currentDateTime {}; Utility::DirtyValue stepCount {}; Utility::DirtyValue notificationState {}; using days = std::chrono::duration>; // TODO: days is standard in c++20