vulf-ify me captain

This commit is contained in:
Ryan Rix 2024-06-09 00:11:00 -07:00
parent 4b854a5d09
commit bb743689e1
2 changed files with 19 additions and 3 deletions

View File

@ -56,9 +56,9 @@ WatchFaceFuzzy::WatchFaceFuzzy(Controllers::DateTime& dateTimeController,
lv_obj_set_style_local_text_color(label_date, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999));
label_time = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(label_time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, 0, 0);
lv_obj_set_style_local_text_font(label_time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20);
lv_label_set_recolor(label_time, true);
lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 0);
heartbeatIcon = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_text_static(heartbeatIcon, Symbols::heartBeat);
@ -104,6 +104,19 @@ void WatchFaceFuzzy::Refresh() {
uint8_t minute = dateTimeController.Minutes();
printTimeWords(hour, minute);
currentDateTime = std::chrono::time_point_cast<std::chrono::minutes>(dateTimeController.CurrentDateTime());
if (currentDate.IsUpdated()) {
uint16_t year = dateTimeController.Year();
uint8_t day = dateTimeController.Day();
lv_label_set_text_fmt(label_date,
"%s %d %s %d",
dateTimeController.DayOfWeekShortToString(),
day,
dateTimeController.MonthShortToString(),
year);
lv_obj_realign(label_date);
}
}
heartbeat = heartRateController.HeartRate();
@ -178,5 +191,7 @@ void WatchFaceFuzzy::printTimeWords(int h, int m) {
sprintf(timeStr, "#ffffff %s#\n#808080 to# #FFFFFF %s#", mod, nums[(h+1) % 12]);
}
printf("%s\n", timeStr);
lv_label_set_text(label_time, timeStr);
lv_obj_realign(label_time);
}

1
src/libs/sunset Submodule

@ -0,0 +1 @@
Subproject commit 4b08734eb8856154d7226bfdced91a571fb6a64b