|
@ -116,17 +116,20 @@ void tft_lvgl_init() { |
|
|
ui_cfg_init(); |
|
|
ui_cfg_init(); |
|
|
disp_language_init(); |
|
|
disp_language_init(); |
|
|
|
|
|
|
|
|
//init tft first!
|
|
|
watchdog_refresh(); // LVGL init takes time
|
|
|
|
|
|
|
|
|
|
|
|
// Init TFT first!
|
|
|
SPI_TFT.spi_init(SPI_FULL_SPEED); |
|
|
SPI_TFT.spi_init(SPI_FULL_SPEED); |
|
|
SPI_TFT.LCD_init(); |
|
|
SPI_TFT.LCD_init(); |
|
|
|
|
|
|
|
|
|
|
|
watchdog_refresh(); // LVGL init takes time
|
|
|
|
|
|
|
|
|
//spi_flash_read_test();
|
|
|
//spi_flash_read_test();
|
|
|
#if ENABLED(SDSUPPORT) |
|
|
#if ENABLED(SDSUPPORT) |
|
|
watchdog_refresh(); |
|
|
|
|
|
UpdateAssets(); |
|
|
UpdateAssets(); |
|
|
|
|
|
watchdog_refresh(); // LVGL init takes time
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
watchdog_refresh(); |
|
|
|
|
|
mks_test_get(); |
|
|
mks_test_get(); |
|
|
|
|
|
|
|
|
touch.Init(); |
|
|
touch.Init(); |
|
@ -189,9 +192,11 @@ void tft_lvgl_init() { |
|
|
|
|
|
|
|
|
lv_encoder_pin_init(); |
|
|
lv_encoder_pin_init(); |
|
|
|
|
|
|
|
|
|
|
|
bool ready = true; |
|
|
#if ENABLED(POWER_LOSS_RECOVERY) |
|
|
#if ENABLED(POWER_LOSS_RECOVERY) |
|
|
recovery.load(); |
|
|
recovery.load(); |
|
|
if (recovery.valid()) { |
|
|
if (recovery.valid()) { |
|
|
|
|
|
ready = false; |
|
|
if (gCfgItems.from_flash_pic) |
|
|
if (gCfgItems.from_flash_pic) |
|
|
flash_preview_begin = true; |
|
|
flash_preview_begin = true; |
|
|
else |
|
|
else |
|
@ -201,14 +206,12 @@ void tft_lvgl_init() { |
|
|
|
|
|
|
|
|
strncpy(public_buf_m, recovery.info.sd_filename, sizeof(public_buf_m)); |
|
|
strncpy(public_buf_m, recovery.info.sd_filename, sizeof(public_buf_m)); |
|
|
card.printLongPath(public_buf_m); |
|
|
card.printLongPath(public_buf_m); |
|
|
|
|
|
|
|
|
strncpy(list_file.long_name[sel_id], card.longFilename, sizeof(list_file.long_name[sel_id])); |
|
|
strncpy(list_file.long_name[sel_id], card.longFilename, sizeof(list_file.long_name[sel_id])); |
|
|
|
|
|
|
|
|
lv_draw_printing(); |
|
|
lv_draw_printing(); |
|
|
} |
|
|
} |
|
|
else |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
lv_draw_ready_print(); |
|
|
|
|
|
|
|
|
if (ready) lv_draw_ready_print(); |
|
|
|
|
|
|
|
|
if (mks_test_flag == 0x1E) |
|
|
if (mks_test_flag == 0x1E) |
|
|
mks_gpio_test(); |
|
|
mks_gpio_test(); |
|
|