@@ -379,19 +379,19 @@ WatchFaceCasioStyleAE21W::WatchFaceCasioStyleAE21W(Controllers::DateTime& dateTi
379379
380380 lfs_file f = {};
381381
382- if (filesystem.FileOpen (&f, " /fonts/7segments_20 .bin" , LFS_O_RDONLY) >= 0 ) {
382+ if (filesystem.FileOpen (&f, " /fonts/TechnologyBR_20 .bin" , LFS_O_RDONLY) >= 0 ) {
383383 filesystem.FileClose (&f);
384- font_7segments_20 = lv_font_load (" F:/fonts/7segments_20 .bin" );
384+ font_TechnologyBR_20 = lv_font_load (" F:/fonts/TechnologyBR_20 .bin" );
385385 }
386386
387- if (filesystem.FileOpen (&f, " /fonts/7segments_40 .bin" , LFS_O_RDONLY) >= 0 ) {
387+ if (filesystem.FileOpen (&f, " /fonts/TechnologyBR_40 .bin" , LFS_O_RDONLY) >= 0 ) {
388388 filesystem.FileClose (&f);
389- font_7segments_40 = lv_font_load (" F:/fonts/7segments_40 .bin" );
389+ font_TechnologyBR_40 = lv_font_load (" F:/fonts/TechnologyBR_40 .bin" );
390390 }
391391
392- if (filesystem.FileOpen (&f, " /fonts/7segments_75 .bin" , LFS_O_RDONLY) >= 0 ) {
392+ if (filesystem.FileOpen (&f, " /fonts/TechnologyBR_75 .bin" , LFS_O_RDONLY) >= 0 ) {
393393 filesystem.FileClose (&f);
394- font_7segments_75 = lv_font_load (" F:/fonts/7segments_75 .bin" );
394+ font_TechnologyBR_75 = lv_font_load (" F:/fonts/TechnologyBR_75 .bin" );
395395 }
396396
397397 const std::array<lv_color_t , 4 >* themeColors = returnThemeColors (static_cast <enum theme>(settingsController.GetCasioStyleAE21WColorIndex ()));
@@ -511,31 +511,32 @@ WatchFaceCasioStyleAE21W::WatchFaceCasioStyleAE21W(Controllers::DateTime& dateTi
511511 // Icons and Labels
512512 label_date = lv_label_create (lv_scr_act (), nullptr );
513513 lv_obj_add_style (label_date, LV_OBJ_PART_MAIN, &style_lcd);
514- lv_obj_set_style_local_text_font (label_date, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_7segments_40 );
515- lv_label_set_text_static (label_date, " 6-30 " );
516- lv_obj_align (label_date, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -30 , -78 );
514+ lv_obj_set_style_local_text_font (label_date, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_TechnologyBR_40 );
515+ lv_label_set_text_static (label_date, " 00-00 " );
516+ lv_obj_align (label_date, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -9 , -78 );
517517
518518 label_time_ampm = lv_label_create (lv_scr_act (), nullptr );
519519 lv_obj_add_style (label_time_ampm, LV_OBJ_PART_MAIN, &style_lcd);
520- lv_obj_set_style_local_text_font (label_time_ampm, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_7segments_20);
521- lv_label_set_text_static (label_time_ampm, " " );
520+ lv_label_set_text_static (label_time_ampm, " A" );
522521 lv_obj_align (label_time_ampm, nullptr , LV_ALIGN_IN_BOTTOM_LEFT, 31 , -8 );
523522
524523 label_seconds = lv_label_create (lv_scr_act (), nullptr );
525524 lv_obj_add_style (label_seconds, LV_OBJ_PART_MAIN, &style_lcd);
526- lv_obj_set_style_local_text_font (label_seconds, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_7segments_40);
527- lv_obj_align (label_seconds, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -30 , -8 );
525+ lv_obj_set_style_local_text_font (label_seconds, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_TechnologyBR_40);
526+ lv_label_set_text_static (label_seconds, " 00" );
527+ lv_obj_align (label_seconds, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -9 , -8 );
528528
529529 label_time = lv_label_create (lv_scr_act (), nullptr );
530530 lv_obj_add_style (label_time, LV_OBJ_PART_MAIN, &style_lcd);
531- lv_obj_set_style_local_text_font (label_time, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_7segments_75);
532- lv_obj_align (label_time, label_seconds, LV_ALIGN_IN_BOTTOM_RIGHT, -179 , 0 );
531+ lv_obj_set_style_local_text_font (label_time, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_TechnologyBR_75);
532+ lv_label_set_text_static (label_time, " 00:00" );
533+ lv_obj_align (label_time, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -52 , -8 );
533534
534535 label_day_of_week = lv_label_create (lv_scr_act (), nullptr );
535536 lv_obj_add_style (label_day_of_week, LV_OBJ_PART_MAIN, &style_lcd);
536- lv_obj_set_style_local_text_font (label_day_of_week, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_7segments_20 );
537- lv_label_set_text_static (label_day_of_week, " SUN " );
538- lv_obj_align (label_day_of_week, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -10 , -43 );
537+ lv_obj_set_style_local_text_font (label_day_of_week, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_TechnologyBR_20 );
538+ lv_label_set_text_static (label_day_of_week, " MON " );
539+ lv_obj_align (label_day_of_week, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -10 , -46 );
539540
540541 label_function = lv_label_create (lv_scr_act (), nullptr );
541542 lv_obj_add_style (label_function, LV_LABEL_PART_MAIN, &style_lcd);
@@ -549,9 +550,9 @@ WatchFaceCasioStyleAE21W::WatchFaceCasioStyleAE21W(Controllers::DateTime& dateTi
549550
550551 stepValue = lv_label_create (lv_scr_act (), nullptr );
551552 lv_obj_add_style (stepValue, LV_OBJ_PART_MAIN, &style_lcd);
552- lv_obj_set_style_local_text_font (stepValue, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_7segments_20 );
553- lv_label_set_text_static (stepValue, " 0K " );
554- lv_obj_align (stepValue, nullptr , LV_ALIGN_IN_LEFT_MID, 101 , 16 );
553+ lv_obj_set_style_local_text_font (stepValue, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_TechnologyBR_20 );
554+ lv_label_set_text_static (stepValue, " 00 " );
555+ lv_obj_align (stepValue, nullptr , LV_ALIGN_IN_LEFT_MID, 98 , 16 );
555556
556557 heartbeatIcon = lv_label_create (lv_scr_act (), nullptr );
557558 lv_obj_add_style (heartbeatIcon, LV_OBJ_PART_MAIN, &style_lcd);
@@ -560,10 +561,10 @@ WatchFaceCasioStyleAE21W::WatchFaceCasioStyleAE21W(Controllers::DateTime& dateTi
560561
561562 heartbeatValue = lv_label_create (lv_scr_act (), nullptr );
562563 lv_obj_add_style (heartbeatValue, LV_OBJ_PART_MAIN, &style_lcd);
563- lv_obj_set_style_local_text_font (heartbeatValue, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_7segments_20 );
564+ lv_obj_set_style_local_text_font (heartbeatValue, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, font_TechnologyBR_20 );
564565 lv_label_set_text_fmt (heartbeatValue, " %d" , heartbeat.Get ());
565- lv_label_set_text_static (heartbeatValue, " " );
566- lv_obj_align (heartbeatValue, nullptr , LV_ALIGN_IN_LEFT_MID, 101 , 38 );
566+ lv_label_set_text_static (heartbeatValue, " -- " );
567+ lv_obj_align (heartbeatValue, nullptr , LV_ALIGN_IN_RIGHT_MID, - 130 , 39 );
567568
568569 weatherIcon = lv_label_create (lv_scr_act (), nullptr );
569570 lv_obj_add_style (weatherIcon, LV_LABEL_PART_MAIN, &style_lcd);
@@ -574,9 +575,9 @@ WatchFaceCasioStyleAE21W::WatchFaceCasioStyleAE21W(Controllers::DateTime& dateTi
574575
575576 temperature = lv_label_create (lv_scr_act (), nullptr );
576577 lv_obj_add_style (temperature, LV_LABEL_PART_MAIN, &style_lcd);
577- lv_obj_set_style_local_text_font (temperature, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_7segments_20 );
578- lv_label_set_text (temperature, " -- " );
579- lv_obj_align (temperature, nullptr , LV_ALIGN_IN_RIGHT_MID, -202 , 38 );
578+ lv_obj_set_style_local_text_font (temperature, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, font_TechnologyBR_20 );
579+ lv_label_set_text (temperature, " 00 " );
580+ lv_obj_align (temperature, nullptr , LV_ALIGN_IN_RIGHT_MID, -202 , 39 );
580581
581582 plugIcon = lv_label_create (lv_scr_act (), nullptr );
582583 lv_obj_add_style (plugIcon, LV_OBJ_PART_MAIN, &style_lcd);
@@ -671,17 +672,17 @@ WatchFaceCasioStyleAE21W::~WatchFaceCasioStyleAE21W() {
671672 lv_task_del (taskRefresh);
672673 taskRefresh = nullptr ;
673674 }
674- if (font_7segments_20 ) {
675- lv_font_free (font_7segments_20 );
676- font_7segments_20 = nullptr ;
675+ if (font_TechnologyBR_20 ) {
676+ lv_font_free (font_TechnologyBR_20 );
677+ font_TechnologyBR_20 = nullptr ;
677678 }
678- if (font_7segments_40 ) {
679- lv_font_free (font_7segments_40 );
680- font_7segments_40 = nullptr ;
679+ if (font_TechnologyBR_40 ) {
680+ lv_font_free (font_TechnologyBR_40 );
681+ font_TechnologyBR_40 = nullptr ;
681682 }
682- if (font_7segments_75 ) {
683- lv_font_free (font_7segments_75 );
684- font_7segments_75 = nullptr ;
683+ if (font_TechnologyBR_75 ) {
684+ lv_font_free (font_TechnologyBR_75 );
685+ font_TechnologyBR_75 = nullptr ;
685686 }
686687
687688 lv_style_reset (&style_bg);
@@ -761,10 +762,9 @@ void WatchFaceCasioStyleAE21W::Refresh() {
761762 ampmChar[0 ] = ' P' ;
762763 }
763764 lv_label_set_text (label_time_ampm, ampmChar);
764- lv_label_set_text_fmt (label_time, " %2d:%02d" , hour, minute);
765- } else {
766- lv_label_set_text_fmt (label_time, " %02d:%02d" , hour, minute);
767765 }
766+ lv_label_set_text_fmt (label_time, " %2d:%02d" , hour, minute);
767+
768768 // Update G1Clock
769769 auto const angle_min = minute * 6 ;
770770 minute_point[0 ] = CoordinateRelocateG1 (10 , angle_min);
@@ -791,9 +791,11 @@ void WatchFaceCasioStyleAE21W::Refresh() {
791791 if (settingsController.GetClockType () == Controllers::Settings::ClockType::H24) {
792792 // 24h mode: ddmmyyyy, first DOW=Monday;
793793 lv_label_set_text_fmt (label_date, " %2d-%2d" , day, month);
794+ lv_obj_align (label_date, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -9 , -78 );
794795 } else {
795796 // 12h mode: mmddyyyy, first DOW=Sunday;
796797 lv_label_set_text_fmt (label_date, " %2d-%2d" , month, day);
798+ lv_obj_align (label_date, nullptr , LV_ALIGN_IN_BOTTOM_RIGHT, -9 , -78 );
797799 }
798800 lv_label_set_text_fmt (label_day_of_week, " %s" , dateTimeController.DayOfWeekShortToString ());
799801 }
@@ -803,15 +805,19 @@ void WatchFaceCasioStyleAE21W::Refresh() {
803805 heartbeatRunning = heartRateController.State () != Controllers::HeartRateController::States::Stopped;
804806 if (heartbeat.IsUpdated () || heartbeatRunning.IsUpdated ()) {
805807 if (heartbeatRunning.Get ()) {
806- lv_label_set_text_fmt (heartbeatValue, " %d" , heartbeat.Get ());
808+ if (heartbeat.Get () > 0 ) {
809+ lv_label_set_text_fmt (heartbeatValue, " %d" , heartbeat.Get ());
810+ } else {
811+ lv_label_set_text_static (heartbeatValue, " --" );
812+ }
807813 } else {
808814 lv_label_set_text_static (heartbeatValue, " OFF" );
809815 }
810816 }
811817
812818 stepCount = motionController.NbSteps ();
813819 if (stepCount.IsUpdated ()) {
814- lv_label_set_text_fmt (stepValue, " %lu " , (stepCount.Get () / 1000 ));
820+ lv_label_set_text_fmt (stepValue, " %luK " , (stepCount.Get () / 1000 ));
815821 lv_obj_realign (stepValue);
816822 lv_obj_realign (stepIcon);
817823 }
@@ -839,20 +845,21 @@ bool WatchFaceCasioStyleAE21W::IsAvailable(Pinetime::Controllers::FS& filesystem
839845
840846 lfs_file file = {};
841847
842- if (filesystem.FileOpen (&file, " /fonts/7segments_20 .bin" , LFS_O_RDONLY) < 0 ) {
848+ if (filesystem.FileOpen (&file, " /fonts/TechnologyBR_20 .bin" , LFS_O_RDONLY) < 0 ) {
843849 return false ;
844850 }
845851
846852 filesystem.FileClose (&file);
847- if (filesystem.FileOpen (&file, " /fonts/7segments_40 .bin" , LFS_O_RDONLY) < 0 ) {
853+ if (filesystem.FileOpen (&file, " /fonts/TechnologyBR_40 .bin" , LFS_O_RDONLY) < 0 ) {
848854 return false ;
849855 }
850856
851857 filesystem.FileClose (&file);
852- if (filesystem.FileOpen (&file, " /fonts/7segments_75 .bin" , LFS_O_RDONLY) < 0 ) {
858+ if (filesystem.FileOpen (&file, " /fonts/TechnologyBR_75 .bin" , LFS_O_RDONLY) < 0 ) {
853859 return false ;
854860 }
855861
856862 filesystem.FileClose (&file);
863+
857864 return true ;
858865}
0 commit comments