Skip to content

Commit

Permalink
add print time
Browse files Browse the repository at this point in the history
  • Loading branch information
solawc committed Apr 11, 2022
1 parent 10a99f9 commit 1636b01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ void lv_draw_dialog(uint8_t type) {
else if (DIALOG_IS(TYPE_FINISH_PRINT)) {
lv_label_set_text(labelDialog, print_file_dialog_menu.print_finish);
lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20);

sprintf_P(public_buf_l, PSTR("%s: %d%d:%d%d:%d%d"), print_file_dialog_menu.print_time, print_time.hours / 10, print_time.hours % 10, print_time.minutes / 10, print_time.minutes % 10, print_time.seconds / 10, print_time.seconds % 10);
lv_obj_t *labelPrintTime = lv_label_create(scr, public_buf_l);
lv_obj_align(labelPrintTime, nullptr, LV_ALIGN_CENTER, 0, -60);
}
else if (DIALOG_IS(PAUSE_MESSAGE_PARKING)) {
lv_label_set_text(labelDialog, pause_msg_menu.pausing);
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void tft_lvgl_init() {
// Init TFT first!
SPI_TFT.spi_init(SPI_FULL_SPEED);
SPI_TFT.LCD_init();

#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
uint16_t usb_flash_loop = 1000;
#if ENABLED(MULTI_VOLUME)
Expand All @@ -161,7 +161,9 @@ void tft_lvgl_init() {
} while((!card.media_driver_usbFlash.isInserted()) && (usb_flash_loop--));
card.mount();
#elif HAS_LOGO_IN_FLASH
// delay(1000);
watchdog_refresh();
// delay(1000);
#endif

watchdog_refresh();
Expand Down

0 comments on commit 1636b01

Please sign in to comment.