diff -r cf91a3a20d0d -r 7b134c27fadb main/files.c --- a/main/files.c Sun May 19 21:05:07 2019 +0200 +++ b/main/files.c Mon Jul 01 23:15:49 2019 +0200 @@ -45,7 +45,7 @@ closedir(dir); } - Buttons_Add(130, 200, 60, 40, "Ok", 0); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 0); Buttons[0].dark = true; Buttons_Show(); @@ -91,11 +91,11 @@ switch (Main_Screen) { case MAIN_TOOLS_FILES: - TopMessage("Bestanden menu"); - Buttons_Add( 20, 40,120, 40, "Restore", 0); - Buttons_Add(180, 40,120, 40, "Backup", 1); - Buttons_Add( 20,120,120, 40, "Directory", 2); - Buttons_Add(130, 200, 60, 40, "Ok", 3); + TopMessage((char *)"Bestanden menu"); + Buttons_Add( 20, 40,120, 40, (char *)"Restore", 0); + Buttons_Add(180, 40,120, 40, (char *)"Backup", 1); + Buttons_Add( 20,120,120, 40, (char *)"Directory", 2); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 3); Buttons[3].dark = true; Buttons_Show(); break; @@ -106,11 +106,11 @@ case MAIN_TOOLS_FILES_RESTORE: case MAIN_TOOLS_FILES_BACKUP: if (Main_Screen == MAIN_TOOLS_FILES_RESTORE) - TopMessage("Restore database"); + TopMessage((char *)"Restore database"); else - TopMessage("Backup database"); - Buttons_Add( 40, 100, 80, 40, "Start", 0); - Buttons_Add(200, 100, 80, 40, "Stop", 1); + TopMessage((char *)"Backup database"); + Buttons_Add( 40, 100, 80, 40, (char *)"Start", 0); + Buttons_Add(200, 100, 80, 40, (char *)"Stop", 1); Buttons[1].dark = true; Buttons_Show(); SoundPlay(SOUND_Prompt); @@ -138,16 +138,16 @@ if (Main_Screen == MAIN_TOOLS_FILES_RESTORE) { ESP_LOGI(TAG, "Restore database"); TFT_setFont(DEJAVU18_FONT, NULL); - TFT_print("Backup:\r\n", 0, 30); + TFT_print((char *)"Backup:\r\n", 0, 30); _fg = TFT_CYAN; - FCopy("/sdcard/etc/", "/spiffs/etc/", "config.conf"); - FCopy("/sdcard/etc/", "/spiffs/etc/", "recipe.conf"); - FCopy("/sdcard/etc/", "/spiffs/etc/", "equipments.conf"); - FCopy("/sdcard/etc/", "/spiffs/etc/", "stations.conf"); - FCopy("/sdcard/etc/", "/spiffs/etc/", "runtime.conf"); + FCopy((char *)"/sdcard/etc/", (char *)"/spiffs/etc/", (char *)"config.conf"); + FCopy((char *)"/sdcard/etc/", (char *)"/spiffs/etc/", (char *)"recipe.conf"); + FCopy((char *)"/sdcard/etc/", (char *)"/spiffs/etc/", (char *)"equipments.conf"); + FCopy((char *)"/sdcard/etc/", (char *)"/spiffs/etc/", (char *)"stations.conf"); + FCopy((char *)"/sdcard/etc/", (char *)"/spiffs/etc/", (char *)"runtime.conf"); _fg = TFT_YELLOW; TFT_setFont(DEJAVU24_FONT, NULL); - TFT_print("Restore gereed, reset!", CENTER, LASTY + 12); + TFT_print((char *)"Restore gereed, reset!", CENTER, LASTY + 12); vTaskDelay(2000 / portTICK_PERIOD_MS); esp_restart(); } else { @@ -157,25 +157,25 @@ dir = opendir("/sdcard/etc"); } if (dir == NULL) { - TFT_print("SD kaart fout", CENTER, CENTER); + TFT_print((char *)"SD kaart fout", CENTER, CENTER); } else { closedir(dir); ESP_LOGI(TAG, "Backup database"); TFT_setFont(DEJAVU18_FONT, NULL); - TFT_print("Backup:\r\n", 0, 30); + TFT_print((char *)"Backup:\r\n", 0, 30); _fg = TFT_CYAN; - FCopy("/spiffs/etc/", "/sdcard/etc/", "config.conf"); - FCopy("/spiffs/etc/", "/sdcard/etc/", "recipe.conf"); - FCopy("/spiffs/etc/", "/sdcard/etc/", "equipments.conf"); - FCopy("/spiffs/etc/", "/sdcard/etc/", "stations.conf"); - FCopy("/spiffs/etc/", "/sdcard/etc/", "runtime.conf"); + FCopy((char *)"/spiffs/etc/", (char *)"/sdcard/etc/", (char *)"config.conf"); + FCopy((char *)"/spiffs/etc/", (char *)"/sdcard/etc/", (char *)"recipe.conf"); + FCopy((char *)"/spiffs/etc/", (char *)"/sdcard/etc/", (char *)"equipments.conf"); + FCopy((char *)"/spiffs/etc/", (char *)"/sdcard/etc/", (char *)"stations.conf"); + FCopy((char *)"/spiffs/etc/", (char *)"/sdcard/etc/", (char *)"runtime.conf"); _fg = TFT_YELLOW; TFT_setFont(DEJAVU24_FONT, NULL); - TFT_print("Backup gereed.", CENTER, LASTY + 12); + TFT_print((char *)"Backup gereed.", CENTER, LASTY + 12); } } - Buttons_Add(130, 200, 60, 40, "Ok", 0); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 0); Buttons[0].dark = true; Buttons_Show(); break; @@ -210,8 +210,8 @@ break; case MAIN_TOOLS_FILES_DIR: - Files_Dir("/sdcard/recipe"); - Files_Dir("/sdcard/w/log"); + Files_Dir((char *)"/sdcard/recipe"); + Files_Dir((char *)"/sdcard/w/log"); Main_Screen = MAIN_TOOLS_FILES; break;