From f95f13188c003fee61ec1f870ddbb440d7dbe86e Mon Sep 17 00:00:00 2001 From: YuXifeng <2860280851@qq.com> Date: Wed, 2 Apr 2025 17:46:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E9=80=89?= =?UTF-8?q?=E5=8F=96=E5=8A=9F=E8=83=BD=EF=BC=8C=E9=80=89=E5=8F=96=E5=90=8E?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=83=A7=E5=BD=95=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/GUI/generated/events_init.c | 70 ++++- main/GUI/generated/gui_guider.h | 7 + .../guider_fonts/lv_font_GB2312_12.c | 236 +++++++++++----- .../guider_fonts/lv_font_GB2312_16.c | 261 ++++++++++++------ main/GUI/generated/setup_scr_screen_imglist.c | 8 +- main/GUI/generated/setup_scr_sscreen_burn.c | 114 +++++++- main/Receiver.c | 4 +- main/file_system/spiffs.c | 11 +- main/file_system/spiffs.h | 2 +- main/main.c | 2 +- 10 files changed, 543 insertions(+), 172 deletions(-) diff --git a/main/GUI/generated/events_init.c b/main/GUI/generated/events_init.c index 05d1075..b0ec499 100644 --- a/main/GUI/generated/events_init.c +++ b/main/GUI/generated/events_init.c @@ -10,12 +10,39 @@ #include "events_init.h" #include #include "lvgl.h" +#include "spiffs.h" + +static const char *TAG = "events_init"; + #if LV_USE_GUIDER_SIMULATOR && LV_USE_FREEMASTER #include "freemaster_client.h" #endif extern lv_indev_t *lvgl_button_indev; +const char* chip_list[6] = { + "esp32c2", + "esp32c3", + "esp32c6", + "esp32", + "esp32s2", + "esp32s3", +}; +static char chip_path[48] = {0}; +static char download_file[64] = {0}; + +static void file_btn_event_handler(lv_event_t *e) { + lv_obj_t *btn = lv_event_get_target(e); // 获取被点击的按钮 + const char *btn_text = lv_list_get_btn_text(guider_ui.screen_imglist_list_1,btn); // 获取按钮上的文本 + + memset(&download_file[0],0x00,64); + sprintf(&download_file[0],"%s/%s",chip_path,btn_text); + printf("被点击的文件: %s\n", download_file); + ui_load_scr_animation(&guider_ui, &guider_ui.sscreen_burn, guider_ui.sscreen_burn_del, &guider_ui.screen_imglist_del, setup_scr_sscreen_burn, LV_SCR_LOAD_ANIM_OVER_LEFT, 200, 200, false, true); + +} + + static void key_event_handler(lv_event_t *e) { lv_event_code_t code = lv_event_get_code(e); @@ -33,12 +60,30 @@ static void key_event_handler(lv_event_t *e) lv_group_add_obj(guider_ui.home_btn_group,guider_ui.screen_btn_1); lv_group_add_obj(guider_ui.home_btn_group,guider_ui.screen_btn_2); lv_group_add_obj(guider_ui.home_btn_group,guider_ui.screen_btn_3); + }else{ + lv_obj_t *dropdown = lv_event_get_target(e); + uint16_t selected_index = lv_dropdown_get_selected(dropdown); + sprintf(&chip_path[0],"/spiffs/%s",chip_list[selected_index]); + // printf("用户选择了: %s (索引: %d)\n", chip_list[selected_index], selected_index); + lv_obj_clean(guider_ui.screen_imglist_list_1); + + lv_obj_t *file_btn[5]; + spiffs_list_t directory[5]; + uint8_t file_num = 0; + file_num = list_files_in_spiffs(chip_path,directory,5); + for(int i=0;iscreen_imglist_list_1 = lv_list_create(ui->screen_imglist); - // ui->screen_imglist_list_1_item0 =lv_list_add_text(ui->screen_imglist_list_1, "save_1"); - lv_obj_t * btn1; - btn1 = lv_list_add_btn(ui->screen_imglist_list_1,LV_SYMBOL_FILE,"OfflineBurn.bin"); - lv_group_add_obj(ui->imglist_group,btn1); - lv_obj_t * btn2; - btn2 = lv_list_add_btn(ui->screen_imglist_list_1,LV_SYMBOL_FILE,"target_esp32s3.bin"); - lv_group_add_obj(ui->imglist_group,btn2); + lv_obj_set_pos(ui->screen_imglist_list_1, 2, 43); lv_obj_set_size(ui->screen_imglist_list_1, 124, 110); lv_obj_set_scrollbar_mode(ui->screen_imglist_list_1, LV_SCROLLBAR_MODE_OFF); diff --git a/main/GUI/generated/setup_scr_sscreen_burn.c b/main/GUI/generated/setup_scr_sscreen_burn.c index b2641c9..38fa3ed 100644 --- a/main/GUI/generated/setup_scr_sscreen_burn.c +++ b/main/GUI/generated/setup_scr_sscreen_burn.c @@ -33,19 +33,44 @@ void setup_scr_sscreen_burn(lv_ui *ui) lv_obj_set_scrollbar_mode(ui->sscreen_burn_cont_1, LV_SCROLLBAR_MODE_OFF); //Write style for sscreen_burn_cont_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. + lv_obj_set_style_bg_opa(ui->sscreen_burn_cont_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_color(ui->sscreen_burn_cont_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_grad_dir(ui->sscreen_burn_cont_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_radius(ui->sscreen_burn_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_shadow_width(ui->sscreen_burn_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_width(ui->sscreen_burn_cont_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_opa(ui->sscreen_burn_cont_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_color(ui->sscreen_burn_cont_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_border_side(ui->sscreen_burn_cont_1, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT); - lv_obj_set_style_radius(ui->sscreen_burn_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); - lv_obj_set_style_bg_opa(ui->sscreen_burn_cont_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); - lv_obj_set_style_bg_color(ui->sscreen_burn_cont_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); - lv_obj_set_style_bg_grad_dir(ui->sscreen_burn_cont_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_top(ui->sscreen_burn_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(ui->sscreen_burn_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_left(ui->sscreen_burn_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); lv_obj_set_style_pad_right(ui->sscreen_burn_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); - lv_obj_set_style_shadow_width(ui->sscreen_burn_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + + //Write codes sscreen_burn_label_1 + ui->sscreen_burn_label_1 = lv_label_create(ui->sscreen_burn_cont_1); + lv_label_set_text(ui->sscreen_burn_label_1, "OfflineBurn.bin"); + lv_label_set_long_mode(ui->sscreen_burn_label_1, LV_LABEL_LONG_WRAP); + lv_obj_set_pos(ui->sscreen_burn_label_1, 0, 0); + lv_obj_set_size(ui->sscreen_burn_label_1, 124, 18); + + //Write style for sscreen_burn_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. + lv_obj_set_style_border_width(ui->sscreen_burn_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_radius(ui->sscreen_burn_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_color(ui->sscreen_burn_label_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_font(ui->sscreen_burn_label_1, &lv_font_GB2312_12, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_opa(ui->sscreen_burn_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_letter_space(ui->sscreen_burn_label_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_line_space(ui->sscreen_burn_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_align(ui->sscreen_burn_label_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_opa(ui->sscreen_burn_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_color(ui->sscreen_burn_label_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_grad_dir(ui->sscreen_burn_label_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_pad_top(ui->sscreen_burn_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_pad_right(ui->sscreen_burn_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_pad_bottom(ui->sscreen_burn_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_pad_left(ui->sscreen_burn_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_shadow_width(ui->sscreen_burn_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); //Write codes sscreen_burn_bar_1 ui->sscreen_burn_bar_1 = lv_bar_create(ui->sscreen_burn); @@ -53,8 +78,8 @@ void setup_scr_sscreen_burn(lv_ui *ui) lv_bar_set_mode(ui->sscreen_burn_bar_1, LV_BAR_MODE_NORMAL); lv_bar_set_range(ui->sscreen_burn_bar_1, 0, 100); lv_bar_set_value(ui->sscreen_burn_bar_1, 50, LV_ANIM_OFF); - lv_obj_set_pos(ui->sscreen_burn_bar_1, 4, 135); - lv_obj_set_size(ui->sscreen_burn_bar_1, 120, 20); + lv_obj_set_pos(ui->sscreen_burn_bar_1, 7, 151); + lv_obj_set_size(ui->sscreen_burn_bar_1, 113, 4); //Write style for sscreen_burn_bar_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. lv_obj_set_style_bg_opa(ui->sscreen_burn_bar_1, 60, LV_PART_MAIN|LV_STATE_DEFAULT); @@ -69,6 +94,81 @@ void setup_scr_sscreen_burn(lv_ui *ui) lv_obj_set_style_bg_grad_dir(ui->sscreen_burn_bar_1, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT); lv_obj_set_style_radius(ui->sscreen_burn_bar_1, 10, LV_PART_INDICATOR|LV_STATE_DEFAULT); + //Write codes sscreen_burn_btn_1 + ui->sscreen_burn_btn_1 = lv_btn_create(ui->sscreen_burn); + ui->sscreen_burn_btn_1_label = lv_label_create(ui->sscreen_burn_btn_1); + lv_label_set_text(ui->sscreen_burn_btn_1_label, "执行烧录"); + lv_label_set_long_mode(ui->sscreen_burn_btn_1_label, LV_LABEL_LONG_WRAP); + lv_obj_align(ui->sscreen_burn_btn_1_label, LV_ALIGN_CENTER, 0, 0); + lv_obj_set_style_pad_all(ui->sscreen_burn_btn_1, 0, LV_STATE_DEFAULT); + lv_obj_set_width(ui->sscreen_burn_btn_1_label, LV_PCT(100)); + lv_obj_set_pos(ui->sscreen_burn_btn_1, 71, 126); + lv_obj_set_size(ui->sscreen_burn_btn_1, 50, 16); + + //Write style for sscreen_burn_btn_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. + lv_obj_set_style_border_width(ui->sscreen_burn_btn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_radius(ui->sscreen_burn_btn_1, 5, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_opa(ui->sscreen_burn_btn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_color(ui->sscreen_burn_btn_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_grad_dir(ui->sscreen_burn_btn_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_shadow_width(ui->sscreen_burn_btn_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_color(ui->sscreen_burn_btn_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_font(ui->sscreen_burn_btn_1, &lv_font_GB2312_12, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_opa(ui->sscreen_burn_btn_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_align(ui->sscreen_burn_btn_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); + + //Write codes sscreen_burn_btn_2 + ui->sscreen_burn_btn_2 = lv_btn_create(ui->sscreen_burn); + ui->sscreen_burn_btn_2_label = lv_label_create(ui->sscreen_burn_btn_2); + lv_label_set_text(ui->sscreen_burn_btn_2_label, "芯片信息"); + lv_label_set_long_mode(ui->sscreen_burn_btn_2_label, LV_LABEL_LONG_WRAP); + lv_obj_align(ui->sscreen_burn_btn_2_label, LV_ALIGN_CENTER, 0, 0); + lv_obj_set_style_pad_all(ui->sscreen_burn_btn_2, 0, LV_STATE_DEFAULT); + lv_obj_set_width(ui->sscreen_burn_btn_2_label, LV_PCT(100)); + lv_obj_set_pos(ui->sscreen_burn_btn_2, 7, 126); + lv_obj_set_size(ui->sscreen_burn_btn_2, 50, 16); + + //Write style for sscreen_burn_btn_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT. + lv_obj_set_style_bg_opa(ui->sscreen_burn_btn_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_color(ui->sscreen_burn_btn_2, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_bg_grad_dir(ui->sscreen_burn_btn_2, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_border_width(ui->sscreen_burn_btn_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_radius(ui->sscreen_burn_btn_2, 5, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_shadow_width(ui->sscreen_burn_btn_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_color(ui->sscreen_burn_btn_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_font(ui->sscreen_burn_btn_2, &lv_font_GB2312_12, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_opa(ui->sscreen_burn_btn_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_obj_set_style_text_align(ui->sscreen_burn_btn_2, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT); + + //Write codes sscreen_burn_spangroup_1 + ui->sscreen_burn_spangroup_1 = lv_spangroup_create(ui->sscreen_burn); + lv_spangroup_set_align(ui->sscreen_burn_spangroup_1, LV_TEXT_ALIGN_LEFT); + lv_spangroup_set_overflow(ui->sscreen_burn_spangroup_1, LV_SPAN_OVERFLOW_CLIP); + lv_spangroup_set_mode(ui->sscreen_burn_spangroup_1, LV_SPAN_MODE_BREAK); + //create span + ui->sscreen_burn_spangroup_1_span = lv_spangroup_new_span(ui->sscreen_burn_spangroup_1); + lv_span_set_text(ui->sscreen_burn_spangroup_1_span, "1:\n2:\n3:\n4:\n5:\n6:\n7:\n8:"); + lv_style_set_text_color(&ui->sscreen_burn_spangroup_1_span->style, lv_color_hex(0x000000)); + lv_style_set_text_decor(&ui->sscreen_burn_spangroup_1_span->style, LV_TEXT_DECOR_NONE); + lv_style_set_text_font(&ui->sscreen_burn_spangroup_1_span->style, &lv_font_montserratMedium_12); + lv_obj_set_pos(ui->sscreen_burn_spangroup_1, 4, 25); + lv_obj_set_size(ui->sscreen_burn_spangroup_1, 120, 96); + + //Write style state: LV_STATE_DEFAULT for &style_sscreen_burn_spangroup_1_main_main_default + static lv_style_t style_sscreen_burn_spangroup_1_main_main_default; + ui_init_style(&style_sscreen_burn_spangroup_1_main_main_default); + + lv_style_set_border_width(&style_sscreen_burn_spangroup_1_main_main_default, 0); + lv_style_set_radius(&style_sscreen_burn_spangroup_1_main_main_default, 0); + lv_style_set_bg_opa(&style_sscreen_burn_spangroup_1_main_main_default, 0); + lv_style_set_pad_top(&style_sscreen_burn_spangroup_1_main_main_default, 0); + lv_style_set_pad_right(&style_sscreen_burn_spangroup_1_main_main_default, 0); + lv_style_set_pad_bottom(&style_sscreen_burn_spangroup_1_main_main_default, 0); + lv_style_set_pad_left(&style_sscreen_burn_spangroup_1_main_main_default, 0); + lv_style_set_shadow_width(&style_sscreen_burn_spangroup_1_main_main_default, 0); + lv_obj_add_style(ui->sscreen_burn_spangroup_1, &style_sscreen_burn_spangroup_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT); + lv_spangroup_refr_mode(ui->sscreen_burn_spangroup_1); + //The custom code of sscreen_burn. diff --git a/main/Receiver.c b/main/Receiver.c index 2add3d0..c933f9b 100644 --- a/main/Receiver.c +++ b/main/Receiver.c @@ -78,7 +78,7 @@ void Connection_test(uint8_t *buffer) data_len = sizeof(Device_info_t) + 2; send_buff[4] = data_len & 0xff; send_buff[5] = (data_len >> 8) & 0xff; - list_files_in_spiffs(off_line_tool.directory, 10); + list_files_in_spiffs("/spiffs",off_line_tool.directory, 10); memcpy(&send_buff[6],&off_line_tool,sizeof(Device_info_t)); if (buffer[0] == 0x01) { // usb_serial_jtag_write_bytes(&send_buff[0],(6 + sizeof(Device_info_t) + 2),20 / portTICK_PERIOD_MS); @@ -124,7 +124,7 @@ void Transfer_file(uint8_t *buffer) } file_size = data_buff[0] | data_buff[1] << 8 | data_buff[2] << 16 | data_buff[3] << 24; - sprintf(&file_name[0],"/spiffs/%s",&data_buff[4]); + sprintf(&file_name[0],"/spiffs/esp32s2/%s",&data_buff[4]); ESP_LOGI(TAG,"file name:%s file size:%ld",file_name,file_size); file = fopen(file_name, "ab"); if (file == NULL) { diff --git a/main/file_system/spiffs.c b/main/file_system/spiffs.c index 54649ed..0c5a591 100644 --- a/main/file_system/spiffs.c +++ b/main/file_system/spiffs.c @@ -38,11 +38,11 @@ esp_err_t init_spiffs(void) return ESP_OK; } -void list_files_in_spiffs(spiffs_list_t *directory, size_t max_files) { - DIR *dir = opendir("/spiffs"); +uint8_t list_files_in_spiffs(const char *dir_path,spiffs_list_t *directory, size_t max_files) { + DIR *dir = opendir(dir_path); if (dir == NULL) { ESP_LOGE(TAG, "Failed to open directory"); - return; + return 0; } struct dirent *entry; @@ -51,10 +51,10 @@ void list_files_in_spiffs(spiffs_list_t *directory, size_t max_files) { uint8_t id = 0; while ((entry = readdir(dir)) != NULL && id < max_files) { - snprintf(filepath, sizeof(filepath), "/spiffs/%s", entry->d_name); + snprintf(filepath, sizeof(filepath), "%s/%s", dir_path, entry->d_name); if (stat(filepath, &st) == 0) { directory[id].id = id; - directory[id].addr = 0; // SPIFFS ±¾ÉíûÓÐÎïÀíµØַ£¬¿ÉÒÔÁô¿ջò×Զ¨Òå + directory[id].addr = 0; // SPIFFS 本身没有物理地址,可以留空或自定义 directory[id].size = st.st_size; memset(directory[id].name, 0, sizeof(directory[id].name)); strncpy(directory[id].name, entry->d_name, sizeof(directory[id].name) - 1); @@ -66,6 +66,7 @@ void list_files_in_spiffs(spiffs_list_t *directory, size_t max_files) { } closedir(dir); + return id; } diff --git a/main/file_system/spiffs.h b/main/file_system/spiffs.h index 331e478..a6923fc 100644 --- a/main/file_system/spiffs.h +++ b/main/file_system/spiffs.h @@ -32,7 +32,7 @@ typedef struct spiffs_list_ extern esp_err_t init_spiffs(void); extern esp_err_t sdmmc_init(void); -extern void list_files_in_spiffs(spiffs_list_t *directory, size_t max_files); +extern uint8_t list_files_in_spiffs(const char *dir_path,spiffs_list_t *directory, size_t max_files); extern void delete_file(const char *file_path); extern void delete_all_file(); // void Read_file(char* filename, Read_data data,uint16_t size); diff --git a/main/main.c b/main/main.c index a7e13fa..c30bfb2 100755 --- a/main/main.c +++ b/main/main.c @@ -86,7 +86,7 @@ void app_main(void) ESP_ERROR_CHECK(esp_event_loop_create_default()); xTaskCreate(&Gui_Task, "Gui_Task", 1024*20, NULL, 12, NULL); init_spiffs(); - list_files_in_spiffs(off_line_tool.directory, 10); + list_files_in_spiffs("/spiffs",off_line_tool.directory, 10); ESP_LOGI(TAG, "Found file: %s, size: %ld bytes", off_line_tool.directory[0].name, off_line_tool.directory[0].size); ESP_LOGI(TAG, "Found file: %s, size: %ld bytes", off_line_tool.directory[1].name, off_line_tool.directory[1].size); ESPFlash_Init();