+ increased stack sizes
+ browser automatically swipes images + touch click switches between log and image viewer
This commit is contained in:
+10
-7
@@ -14,29 +14,32 @@ void app_main(void){
|
||||
|
||||
ESP_LOGI(TAG, "Creating log UI");
|
||||
create_log_ui();
|
||||
ui_log_append("Start display application");
|
||||
ui_log_append("Creating log UI");
|
||||
|
||||
ESP_LOGI(TAG, "Initializing SD card");
|
||||
ui_log_append("\nInitializing SD card...");
|
||||
ESP_LOGI(TAG, "\nInitializing SD card");
|
||||
ui_log_append("Initializing SD card");
|
||||
sd_init();
|
||||
print_sd_card_info();
|
||||
ui_log_append("SD initialization done");
|
||||
ESP_LOGI(TAG, "SD card initialization complete");
|
||||
ESP_LOGI(TAG, "SD card initialization done");
|
||||
|
||||
ui_log_append("\nListing files in root directory:");
|
||||
ui_log_append("\nListing files in root directory");
|
||||
size_t file_count = sd_get_file_count();
|
||||
ESP_LOGI(TAG, "Found %d files in root directory", file_count);
|
||||
ui_log_appendf("Found %u files in root directory", (unsigned int)file_count);
|
||||
const char* filename = NULL;
|
||||
|
||||
while(file_count-- > 0 && (filename = sd_get_next_file()) != NULL){
|
||||
ESP_LOGI(TAG, "Found file: %s", filename);
|
||||
char line[96];
|
||||
snprintf(line, sizeof(line), "Found file: %s", filename);
|
||||
ui_log_append(line);
|
||||
ui_log_appendf("Found file: %s", filename);
|
||||
vTaskDelay(pdMS_TO_TICKS(1));
|
||||
}
|
||||
|
||||
ui_log_append("Done listing files in root directory");
|
||||
|
||||
ui_log_append("\nSwitching to image browser UI");
|
||||
ESP_LOGI(TAG, "Switching to image browser UI");
|
||||
ui_switch_view_to(UI_VIEW_IMAGE_BROWSER);
|
||||
|
||||
// sd_destroy();
|
||||
|
||||
Reference in New Issue
Block a user