# HG changeset patch # User Michiel Broek # Date 1562015749 -7200 # Node ID 7b134c27fadbed4dc7426ad0a49125bb42507fc5 # Parent cf91a3a20d0dafc966e73fe0192d81dcc16e9d35 Upgraded esp-ide and compilers. Adjusted the sources for the new compiler warnings. diff -r cf91a3a20d0d -r 7b134c27fadb main/automation.c --- a/main/automation.c Sun May 19 21:05:07 2019 +0200 +++ b/main/automation.c Mon Jul 01 23:15:49 2019 +0200 @@ -86,9 +86,9 @@ // Check for a crashed session. if (runtime.AutoModeStarted) { - TopMessage("Brouwen hervatten?"); - Buttons_Add( 40, 100, 80, 40, "Ja", 0); - Buttons_Add(200, 100, 80, 40, "Nee", 1); + TopMessage((char *)"Brouwen hervatten?"); + Buttons_Add( 40, 100, 80, 40, (char *)"Ja", 0); + Buttons_Add(200, 100, 80, 40, (char *)"Nee", 1); Buttons_Show(); SoundPlay(SOUND_Prompt); loop = true; @@ -114,7 +114,7 @@ ESP_LOGI(TAG, "Resume brew screen %d, time left %d", Main_Screen, TimeLeft); log_begin((time_t)0); update_json(); - log_annotation(ANNOTATION_SYSTEM, "Resume"); + log_annotation(ANNOTATION_SYSTEM, (char *)"Resume"); return true; break; @@ -160,7 +160,7 @@ driver_state->hlt_mode = HLT_MODE_BANG; xSemaphoreGive(xSemaphoreDriver); } - TopMessage("Spoelwater opwarmen"); + TopMessage((char *)"Spoelwater opwarmen"); MLT_info(71, 26, false); HLT_info(71,150, false, false); } @@ -202,12 +202,12 @@ } MashState = Sub_Screen = MASH_NONE; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); pumpTime = 0; pumpRest = false; runtime.StageResume = Main_Screen; updateRuntime = true; - TopMessage("Maischen"); + TopMessage((char *)"Maischen"); MLT_info(71, 26, false); if (_UseHLT) { HLT_info(71,170, false, true); @@ -227,10 +227,10 @@ updateRuntime = true; TempReached = false; - TopMessage("Naar koken"); + TopMessage((char *)"Naar koken"); MLT_info(71, 26, false); - Buttons_Add( 5, 30, 60, 40, "+sp", 0); - Buttons_Add(255, 30, 60, 40, "-sp", 1); + Buttons_Add( 5, 30, 60, 40, (char *)"+sp", 0); + Buttons_Add(255, 30, 60, 40, (char *)"-sp", 1); Buttons_Show(); ESP_LOGI(TAG, "Mash done, going to boil."); Sub_Screen = 0; @@ -255,15 +255,15 @@ SoundPlay(SOUND_TempReached); BoilPower = equipment.BoilPower; updateRuntime = true; - TopMessage("Koken"); + TopMessage((char *)"Koken"); MLT_info(71, 26, false); - Buttons_Add( 3, 30, 60, 40, "+sp", 0); - Buttons_Add(257, 30, 60, 40, "-sp", 1); - Buttons_Add( 3, 190, 60, 40, "+1m", 2); - Buttons_Add(257, 190, 60, 40, "-1m", 3); + Buttons_Add( 3, 30, 60, 40, (char *)"+sp", 0); + Buttons_Add(257, 30, 60, 40, (char *)"-sp", 1); + Buttons_Add( 3, 190, 60, 40, (char *)"+1m", 2); + Buttons_Add(257, 190, 60, 40, (char *)"-1m", 3); Buttons_Show(); ESP_LOGI(TAG, "Boil temperature reached, boil %d minutes", (TimeLeft / 60) -1); - log_annotation(ANNOTATION_STAGE, "Koken"); + log_annotation(ANNOTATION_STAGE, (char *)"Koken"); Sub_Screen = 0; break; @@ -284,9 +284,9 @@ Main_Screen = MAIN_AUTO_COOLING_C; return true; //goto startover; } - TopMessage("Start koelen?"); - Buttons_Add( 40, 100, 80, 40, "Start", 0); - Buttons_Add(200, 100, 80, 40, "Stop", 1); + TopMessage((char *)"Start koelen?"); + 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); @@ -321,9 +321,9 @@ return true; //goto startover; } - TopMessage("Start Whirlpool?"); - Buttons_Add( 40, 100, 80, 40, "Start", 0); - Buttons_Add(200, 100, 80, 40, "Stop", 1); + TopMessage((char *)"Start Whirlpool?"); + 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); @@ -344,11 +344,11 @@ _fg = TFT_YELLOW; TFT_setFont(DEJAVU24_FONT, NULL); if (Main_Screen == MAIN_AUTO_DONE) { - TFT_print("Brouwen is gereed.", CENTER, CENTER); + TFT_print((char *)"Brouwen is gereed.", CENTER, CENTER); ESP_LOGI(TAG, "Brew is done"); SoundPlay(SOUND_End); } else { - TFT_print("Brouwen is afgebroken.", CENTER, CENTER); + TFT_print((char *)"Brouwen is afgebroken.", CENTER, CENTER); ESP_LOGI(TAG, "Brew is aborted"); SoundPlay(SOUND_Warn); } @@ -362,7 +362,7 @@ runtime.TimeBrewing = 0; runtime.StageTimeLeft = 0; updateRuntime = true; - Buttons_Add(130, 200, 60, 40, "Ok", 0); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 0); Buttons[0].dark = true; Buttons_Show(); break; @@ -395,22 +395,22 @@ read_recipe(config.RecipeRec); snprintf(msg, 255, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\",\"brew1\":\"%s\",\"brew2\":\"%s\"}", Main_Screen, Sub_Screen, equipment.Name, recipe.Name); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); y = 28; - TopMessage("Automaat"); + TopMessage((char *)"Automaat"); TFT_setFont(DEFAULT_FONT, NULL); - ShowText(2,y,"Installatie", equipment.Name); + ShowText(2,y,(char *)"Installatie", equipment.Name); y += 16; - ShowText(2,y,"Recept", recipe.Name); + ShowText(2,y,(char *)"Recept", recipe.Name); y += 16; - ShowFloat(2, y, "Maisch in", " C", recipe.MashStep[0].Temperature, 2); - ShowFloat(162, y, "Spoelwater", " C", recipe.SpargeTemp, 2); + ShowFloat(2, y, (char *)"Maisch in", (char *)" C", recipe.MashStep[0].Temperature, 2); + ShowFloat(162, y, (char *)"Spoelwater", (char *)" C", recipe.SpargeTemp, 2); y += 16; _fg = TFT_WHITE; - TFT_print("Maisch stap", 2, y); - TFT_print("T", 200, y); - TFT_print("Temp.", 220, y); - TFT_print("Rust", 280, y); + TFT_print((char *)"Maisch stap", 2, y); + TFT_print((char *)"T", 200, y); + TFT_print((char *)"Temp.", 220, y); + TFT_print((char *)"Rust", 280, y); _fg = TFT_YELLOW; y += 16; for (int i = 1; i < 8; i++) { @@ -426,45 +426,45 @@ y += 16; } } - ShowInteger(2, y, "Kooktijd", " min", recipe.BoilTime); - ShowFloat(162, y, "Koel tot", " C", recipe.CoolTemp, 2); + ShowInteger(2, y, (char *)"Kooktijd", (char *)" min", recipe.BoilTime); + ShowFloat(162, y, (char *)"Koel tot", (char *)" C", recipe.CoolTemp, 2); y += 16; if (recipe.Additions) { _fg = TFT_YELLOW; sprintf(tmp, "%d ", recipe.Additions); TFT_print(tmp, 2, y); _fg = TFT_WHITE; - TFT_print("toevoegingen om", LASTX, y); + TFT_print((char *)"toevoegingen om", LASTX, y); _fg = TFT_YELLOW; for (int i = 1; i <= recipe.Additions; i++) { sprintf(tmp, " %d", recipe.Addition[i-1].Time); TFT_print(tmp, LASTX, y); } _fg = TFT_WHITE; - TFT_print(" minuten", LASTX, y); + TFT_print((char *)" minuten", LASTX, y); } else { _fg = TFT_WHITE; - TFT_print("Geen hop toevoegingen.", 2, y); + TFT_print((char *)"Geen hop toevoegingen.", 2, y); } y += 16; if (recipe.Whirlpool9) { - ShowInteger(2, y, "Whirlpool 88..100 graden", " minuten", recipe.Whirlpool9); + ShowInteger(2, y, (char *)"Whirlpool 88..100 graden", (char *)" minuten", recipe.Whirlpool9); y += 16; } if (recipe.Whirlpool7) { - ShowInteger(2, y, "Whirlpool 71..77 graden", " minuten", recipe.Whirlpool7); + ShowInteger(2, y, (char *)"Whirlpool 71..77 graden", (char *)" minuten", recipe.Whirlpool7); y += 16; } if (recipe.Whirlpool6) { - ShowInteger(2, y, "Whirlpool 60..66 graden", " minuten", recipe.Whirlpool6); + ShowInteger(2, y, (char *)"Whirlpool 60..66 graden", (char *)" minuten", recipe.Whirlpool6); y += 16; } if (recipe.Whirlpool2) { - ShowInteger(2, y, "Whirlpool koud", " minuten", recipe.Whirlpool2); + ShowInteger(2, y, (char *)"Whirlpool koud", (char *)" minuten", recipe.Whirlpool2); y += 16; } - Buttons_Add( 0, 210, 70, 30, "Stop" , 0); - Buttons_Add(250, 210, 70, 30, "Start" , 1); + Buttons_Add( 0, 210, 70, 30, (char *)"Stop" , 0); + Buttons_Add(250, 210, 70, 30, (char *)"Start" , 1); Buttons[0].dark = true; Buttons_Show(); loop = true; @@ -489,10 +489,10 @@ _UseHLT = false; _bg = TFT_BLACK; TFT_fillScreen(_bg); - TopMessage("Maisch water aanwezig?"); + TopMessage((char *)"Maisch water aanwezig?"); Buttons_Clear(); - Buttons_Add( 40, 100, 80, 40, "Ja", 0); - Buttons_Add(200, 100, 80, 40, "Nee", 1); + Buttons_Add( 40, 100, 80, 40, (char *)"Ja", 0); + Buttons_Add(200, 100, 80, 40, (char *)"Nee", 1); Buttons_Show(); SoundPlay(SOUND_Prompt); loop = true; @@ -513,7 +513,7 @@ break; if ((equipment.SSR2 == SSR2_HLT_SHARE) || (equipment.SSR2 == SSR2_HLT_IND)) { - TopMessage("Spoelwater aanwezig?"); + TopMessage((char *)"Spoelwater aanwezig?"); SoundPlay(SOUND_Prompt); loop = true; while (loop) { @@ -615,7 +615,7 @@ } MashState = Sub_Screen = MASH_WAITTEMP; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); ESP_LOGI(TAG, "Mash step %d type: %s time: %d temp: %4.1f min: %4.1f max: %4.1f", Main_Screen - MAIN_AUTO_MASH_IN, mashTypes[recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Type], stageTime, stageTemp, MinMash, MaxMash); @@ -623,7 +623,7 @@ if (Main_Screen > MAIN_AUTO_MASH_IN) { // Do not annotate before the log is open. if (Main_Screen == MAIN_AUTO_MASH_OUT) { - log_annotation(ANNOTATION_STAGE, "Uitmaischen"); + log_annotation(ANNOTATION_STAGE, (char *)"Uitmaischen"); } else { sprintf(logline, "Maisch: %d", Main_Screen - MAIN_AUTO_MASH_IN); log_annotation(ANNOTATION_STAGE, logline); @@ -638,9 +638,9 @@ } if ((Main_Screen > MAIN_AUTO_MASH_IN) && (Main_Screen < MAIN_AUTO_MASH_OUT) && (recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Type == MASHTYPE_INFUSION)) { - Buttons_Add( 5,120, 60, 40, "Halt", 0); + Buttons_Add( 5,120, 60, 40, (char *)"Halt", 0); Buttons[0].dark = true; - Buttons_Add(255,120, 60, 40, "Ok", 1); + Buttons_Add(255,120, 60, 40, (char *)"Ok", 1); Buttons_Show(); _fg = TFT_WHITE; _bg = TFT_BLACK; @@ -651,7 +651,7 @@ SoundPlay(SOUND_Prompt); MashState = Sub_Screen = MASH_INFUSE; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"%s\"}", Main_Screen, Sub_Screen, temp_buf); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { // No heating during the infusion. driver_state->mlt_sp = stageTemp; @@ -660,8 +660,8 @@ } ESP_LOGI(TAG, "Mash infusion prompt"); } else { - Buttons_Add( 5, 30, 60, 40, "+sp", 0); - Buttons_Add(255, 30, 60, 40, "-sp", 1); + Buttons_Add( 5, 30, 60, 40, (char *)"+sp", 0); + Buttons_Add(255, 30, 60, 40, (char *)"-sp", 1); Buttons_Show(); } @@ -675,7 +675,7 @@ TempReached = true; MashState = Sub_Screen = MASH_REST; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); if (Main_Screen == MAIN_AUTO_MASH_IN) { TimerSet(0); } else { @@ -689,8 +689,8 @@ updateRuntime = true; ESP_LOGI(TAG, "Mash step %d temperature reached, rest time %d", Main_Screen - MAIN_AUTO_MASH_IN, TimeLeft / 60); Buttons_Clear(); - Buttons_Add( 0, 120, 60, 40, "+1m", 0); - Buttons_Add(260, 120, 60, 40, "-1m", 1); + Buttons_Add( 0, 120, 60, 40, (char *)"+1m", 0); + Buttons_Add(260, 120, 60, 40, (char *)"-1m", 1); Buttons_Show(); } switch (Buttons_Scan()) { @@ -766,20 +766,20 @@ /* * Add Mash prompt. */ - log_annotation(ANNOTATION_EVENT, "Mout storten"); + log_annotation(ANNOTATION_EVENT, (char *)"Mout storten"); Buttons_Clear(); - Buttons_Add( 5,120, 60, 40, "Halt", 0); + Buttons_Add( 5,120, 60, 40, (char *)"Halt", 0); Buttons[0].dark = true; - Buttons_Add(255,120, 60, 40, "Ok", 1); + Buttons_Add(255,120, 60, 40, (char *)"Ok", 1); Buttons_Show(); _fg = TFT_WHITE; _bg = TFT_BLACK; TFT_setFont(DEJAVU24_FONT, NULL); - TFT_print("Mout storten?", CENTER, 135); + TFT_print((char *)"Mout storten?", CENTER, 135); SoundPlay(SOUND_Prompt); MashState = Sub_Screen = MASH_ADD; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"Mout storten?\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); ESP_LOGI(TAG, "Mash add prompt"); break; } @@ -787,23 +787,23 @@ /* * Iodone test prompt. */ - log_annotation(ANNOTATION_EVENT, "Jodium test"); + log_annotation(ANNOTATION_EVENT, (char *)"Jodium test"); TFT_fillRect(0, 120, 320, 50, TFT_BLACK); Buttons_Clear(); - Buttons_Add( 5,120, 60, 40, "Halt", 0); + Buttons_Add( 5,120, 60, 40, (char *)"Halt", 0); Buttons[0].dark = true; - Buttons_Add(255,120, 60, 40, "Ok", 1); + Buttons_Add(255,120, 60, 40, (char *)"Ok", 1); Buttons_Show(); _fg = TFT_WHITE; _bg = TFT_BLACK; TFT_setFont(DEJAVU24_FONT, NULL); - TFT_print("Jodium test?", CENTER, 127); + TFT_print((char *)"Jodium test?", CENTER, 127); SoundPlay(SOUND_Prompt); beeped = false; TimerSet(config.IodineTime * 60); MashState = Sub_Screen = MASH_IODINE; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"Jodium test?\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); ESP_LOGI(TAG, "Mash iodine test prompt"); break; } @@ -811,21 +811,21 @@ /* * Mash remove prompt. */ - log_annotation(ANNOTATION_EVENT, "Mout verwijderen"); + log_annotation(ANNOTATION_EVENT, (char *)"Mout verwijderen"); TFT_fillRect(0, 120, 320, 50, TFT_BLACK); Buttons_Clear(); - Buttons_Add( 5,120, 60, 40, "Halt", 0); + Buttons_Add( 5,120, 60, 40, (char *)"Halt", 0); Buttons[0].dark = true; - Buttons_Add(255,120, 60, 40, "Ok", 1); + Buttons_Add(255,120, 60, 40, (char *)"Ok", 1); Buttons_Show(); _fg = TFT_WHITE; _bg = TFT_BLACK; TFT_setFont(DEJAVU18_FONT, NULL); - TFT_print("Mout verwijderen?", CENTER, 135); + TFT_print((char *)"Mout verwijderen?", CENTER, 135); SoundPlay(SOUND_Prompt); MashState = Sub_Screen = MASH_REMOVE; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"Mout verwijderen?\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); ESP_LOGI(TAG, "Mash remove prompt"); break; } @@ -880,7 +880,7 @@ break; case 1: MashState = Sub_Screen = MASH_WAITTEMP; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { // Start PID again. driver_state->mlt_sp = stageTemp; @@ -888,11 +888,11 @@ xSemaphoreGive(xSemaphoreDriver); } Buttons_Clear(); - Buttons_Add( 5, 30, 60, 40, "+sp", 0); - Buttons_Add(255, 30, 60, 40, "-sp", 1); + Buttons_Add( 5, 30, 60, 40, (char *)"+sp", 0); + Buttons_Add(255, 30, 60, 40, (char *)"-sp", 1); Buttons_Show(); TFT_fillRect(65, 120, 190, 40, TFT_BLACK); - log_annotation(ANNOTATION_EVENT, "Eind infusie"); + log_annotation(ANNOTATION_EVENT, (char *)"Eind infusie"); break; default: break; } @@ -952,22 +952,22 @@ SoundPlay(SOUND_AddHop); runtime.HopAddition++; } else { - TopMessage("Koken"); + TopMessage((char *)"Koken"); } runtime.StageTimeLeft = TimeLeft / 60; updateRuntime = true; } if (TimeLeft < 60) { if (Output) { - log_annotation(ANNOTATION_STAGE, "Vlamuit"); + log_annotation(ANNOTATION_STAGE, (char *)"Vlamuit"); } // Flameout Output = 0; } else if (driver_state->mlt_pv >= stageTemp) { Output = (int)((BoilPower * 255.0) / 100.0); if (Buttons[4].x == -1) { - Buttons_Add( 3,110, 60, 40, "+%", 4); - Buttons_Add(257,110, 60, 40, "-%", 5); + Buttons_Add( 3,110, 60, 40, (char *)"+%", 4); + Buttons_Add(257,110, 60, 40, (char *)"-%", 5); Buttons_Show(); } } else { @@ -1056,7 +1056,7 @@ stageTemp = recipe.CoolTemp; } snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); CoolBeep = false; ESP_LOGI(TAG, "Start cooling from %6.2f to %4.1f", ds18b20_state->mlt_temperature, stageTemp); if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { @@ -1064,19 +1064,19 @@ driver_state->mlt_sp = stageTemp; xSemaphoreGive(xSemaphoreDriver); } - log_annotation(ANNOTATION_STAGE, "Koelen"); - TopMessage("Koelen"); + log_annotation(ANNOTATION_STAGE, (char *)"Koelen"); + TopMessage((char *)"Koelen"); MLT_info(71, 26, false); - Buttons_Add( 5, 200, 60, 40, "Stop", 0); + Buttons_Add( 5, 200, 60, 40, (char *)"Stop", 0); Buttons[0].dark = true; - Buttons_Add( 5, 26, 60, 40, "+1", 1); - Buttons_Add(255, 26, 60, 40, "-1", 2); + Buttons_Add( 5, 26, 60, 40, (char *)"+1", 1); + Buttons_Add(255, 26, 60, 40, (char *)"-1", 2); /* * The next key is not a mistake, but we need a key entry which * will later become the pump key. The keyscan routine will find * the original key if pressed. */ - Buttons_Add(255, 26, 60, 40, "-1", 3); + Buttons_Add(255, 26, 60, 40, (char *)"-1", 3); Buttons_Show(); } } else { @@ -1102,7 +1102,7 @@ * Redefine key number 3 if it is at the position of key 2. */ if ((driver_state->mlt_pv < equipment.PumpMaxTemp) && (Buttons[3].x == Buttons[2].x) &&(Buttons[3].y == Buttons[2].y)) { - Buttons_Add(255, 200, 60, 40, "Pomp", 3); + Buttons_Add(255, 200, 60, 40, (char *)"Pomp", 3); Buttons_Show(); } xSemaphoreGive(xSemaphoreDriver); @@ -1123,9 +1123,9 @@ } break; - case 0: Buttons_Add( 60, 150, 90, 40, "Stoppen", 4); + case 0: Buttons_Add( 60, 150, 90, 40, (char *)"Stoppen", 4); Buttons[4].dark = true; - Buttons_Add(170, 150, 90, 40, "Sorry", 5); + Buttons_Add(170, 150, 90, 40, (char *)"Sorry", 5); Buttons_Show(); break; @@ -1214,7 +1214,7 @@ TFT_fillScreen(_bg); Sub_Screen = 1; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); if (Main_Screen == MAIN_AUTO_WHIRLPOOL9) { TimeWhirlPool = recipe.Whirlpool9; if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { @@ -1222,7 +1222,7 @@ driver_state->mlt_mode = MLT_MODE_PID; xSemaphoreGive(xSemaphoreDriver); } - TopMessage("Whirlpool 88..100"); + TopMessage((char *)"Whirlpool 88..100"); } else if (Main_Screen == MAIN_AUTO_WHIRLPOOL7) { TimeWhirlPool = recipe.Whirlpool7; if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { @@ -1230,7 +1230,7 @@ driver_state->mlt_mode = MLT_MODE_PID; xSemaphoreGive(xSemaphoreDriver); } - TopMessage("Whirlpool 71..77"); + TopMessage((char *)"Whirlpool 71..77"); } else if (Main_Screen == MAIN_AUTO_WHIRLPOOL6) { TimeWhirlPool = recipe.Whirlpool6; if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { @@ -1238,10 +1238,10 @@ driver_state->mlt_mode = MLT_MODE_PID; xSemaphoreGive(xSemaphoreDriver); } - TopMessage("Whirlpool 60..66"); + TopMessage((char *)"Whirlpool 60..66"); } else { TimeWhirlPool = recipe.Whirlpool2; - TopMessage("Koude whirlpool"); + TopMessage((char *)"Koude whirlpool"); } if (Resume) { TimeWhirlPool = runtime.StageTimeLeft; @@ -1254,16 +1254,16 @@ driver_state->pump_run = (driver_state->mlt_pv < equipment.PumpMaxTemp) ? 1 : 0; xSemaphoreGive(xSemaphoreDriver); } - log_annotation(ANNOTATION_STAGE, "Whirlpool"); + log_annotation(ANNOTATION_STAGE, (char *)"Whirlpool"); TimerSet(TimeWhirlPool * 60); runtime.StageTimeLeft = TimeWhirlPool; updateRuntime = true; MLT_info(71, 26, false); ESP_LOGI(TAG, "Whirlpool %d minutes, sp %4.1f", TimeWhirlPool, driver_state->mlt_sp); - Buttons_Add(255, 120, 60, 40, "+1m", 0); - Buttons_Add( 5, 120, 60, 40, "-1m", 1); - Buttons_Add(255, 200, 60, 40, "Pomp", 2); + Buttons_Add(255, 120, 60, 40, (char *)"+1m", 0); + Buttons_Add( 5, 120, 60, 40, (char *)"-1m", 1); + Buttons_Add(255, 200, 60, 40, (char *)"Pomp", 2); Buttons_Show(); } } else { diff -r cf91a3a20d0d -r 7b134c27fadb main/brewboard.c --- a/main/brewboard.c Sun May 19 21:05:07 2019 +0200 +++ b/main/brewboard.c Mon Jul 01 23:15:49 2019 +0200 @@ -43,7 +43,7 @@ TFT_setFont(DEJAVU18_FONT, NULL); _fg = TFT_CYAN; - TFT_print("Mount /spiffs ", 0, LASTY+tempy); + TFT_print((char *)"Mount /spiffs ", 0, LASTY+tempy); ESP_LOGI(TAG, "Initializing SPIFFS"); esp_vfs_spiffs_conf_t conf = { @@ -66,7 +66,7 @@ ESP_LOGE(TAG, "Failed to initialize SPIFFS (%d)", ret); } _fg = TFT_RED; - TFT_print("error\r\n", LASTX, LASTY); + TFT_print((char *)"error\r\n", LASTX, LASTY); return; // Stop application. } @@ -75,12 +75,12 @@ if (ret != ESP_OK) { ESP_LOGE(TAG, "Failed to get SPIFFS partition information"); _fg = TFT_RED; - TFT_print("error\r\n", LASTX, LASTY); + TFT_print((char *)"error\r\n", LASTX, LASTY); return; // Stop application. } else { ESP_LOGI(TAG, "Partition size: %d, used: %d - %d%%", total, used, (used * 100) / total); } - TFT_print("Ok\r\n", LASTX, LASTY); + TFT_print((char *)"Ok\r\n", LASTX, LASTY); // Just to debug, list the /spiffs filesystem. #if 1 @@ -102,12 +102,12 @@ /* * Read or create configuration */ - TFT_print("Ophalen configuratie ", LASTX, LASTY); + TFT_print((char *)"Ophalen configuratie ", LASTX, LASTY); read_config(); read_equipment(config.EquipmentRec); read_runtime(); read_recipe(config.RecipeRec); - TFT_print("Ok\r\n", LASTX, LASTY); + TFT_print((char *)"Ok\r\n", LASTX, LASTY); // Set the Touchscreen calibration/ TS_set_calibration(config.ts_xleft, config.ts_xright, config.ts_ytop, config.ts_ybottom); @@ -122,7 +122,7 @@ xSemaphoreDS18B20 = xSemaphoreCreateMutex(); xSemaphoreDriver = xSemaphoreCreateMutex(); - TFT_print("Starten taken ", LASTX, LASTY); + TFT_print((char *)"Starten taken ", LASTX, LASTY); xTaskCreate(&task_tft, "task_tft", 6144, NULL, 4, &xTaskTFT); vTaskDelay(400 / portTICK_PERIOD_MS); xTaskCreate(&task_ds18b20, "task_ds18b20", 2560, NULL, 8, &xTaskDS18B20); @@ -132,12 +132,12 @@ /* lower the wifi logging level */ esp_log_level_set("wifi", ESP_LOG_ERROR); xTaskCreate(&task_wifi, "task_wifi", 4096, NULL, 3, &xTaskWifi); - TFT_print(" Ok\r\nConnecting ", LASTX, LASTY); + TFT_print((char *)" Ok\r\nConnecting ", LASTX, LASTY); int wait = 20; while (wait) { vTaskDelay(750 / portTICK_PERIOD_MS); - TFT_print(".", LASTX, LASTY); + TFT_print((char *)".", LASTX, LASTY); if (xSemaphoreTake(xSemaphoreWiFi, 25) == pdTRUE) { if (wifi_state->STA_connected == true) wait = 0; @@ -146,7 +146,7 @@ xSemaphoreGive(xSemaphoreWiFi); } } - TFT_print(" Ok\r\n", LASTX, LASTY); + TFT_print((char *)" Ok\r\n", LASTX, LASTY); SoundPlay(SOUND_StartUp); start_http_websocket(); diff -r cf91a3a20d0d -r 7b134c27fadb main/buttons.c --- a/main/buttons.c Sun May 19 21:05:07 2019 +0200 +++ b/main/buttons.c Mon Jul 01 23:15:49 2019 +0200 @@ -175,49 +175,49 @@ { Buttons_Clear(); - Buttons_Add( 2, 80,28,36,"q", 0); - Buttons_Add( 34, 80,28,36,"w", 1); - Buttons_Add( 66, 80,28,36,"e", 2); - Buttons_Add( 98, 80,28,36,"r", 3); - Buttons_Add(130, 80,28,36,"t", 4); - Buttons_Add(162, 80,28,36,"y", 5); - Buttons_Add(194, 80,28,36,"u", 6); - Buttons_Add(226, 80,28,36,"i", 7); - Buttons_Add(258, 80,28,36,"o", 8); - Buttons_Add(290, 80,28,36,"p", 9); + Buttons_Add( 2, 80,28,36,(char *)"q", 0); + Buttons_Add( 34, 80,28,36,(char *)"w", 1); + Buttons_Add( 66, 80,28,36,(char *)"e", 2); + Buttons_Add( 98, 80,28,36,(char *)"r", 3); + Buttons_Add(130, 80,28,36,(char *)"t", 4); + Buttons_Add(162, 80,28,36,(char *)"y", 5); + Buttons_Add(194, 80,28,36,(char *)"u", 6); + Buttons_Add(226, 80,28,36,(char *)"i", 7); + Buttons_Add(258, 80,28,36,(char *)"o", 8); + Buttons_Add(290, 80,28,36,(char *)"p", 9); - Buttons_Add( 18,120,28,36,"a",10); - Buttons_Add( 50,120,28,36,"s",11); - Buttons_Add( 82,120,28,36,"d",12); - Buttons_Add(114,120,28,36,"f",13); - Buttons_Add(146,120,28,36,"g",14); - Buttons_Add(178,120,28,36,"h",15); - Buttons_Add(210,120,28,36,"j",16); - Buttons_Add(242,120,28,36,"k",17); - Buttons_Add(274,120,28,36,"l",18); + Buttons_Add( 18,120,28,36,(char *)"a",10); + Buttons_Add( 50,120,28,36,(char *)"s",11); + Buttons_Add( 82,120,28,36,(char *)"d",12); + Buttons_Add(114,120,28,36,(char *)"f",13); + Buttons_Add(146,120,28,36,(char *)"g",14); + Buttons_Add(178,120,28,36,(char *)"h",15); + Buttons_Add(210,120,28,36,(char *)"j",16); + Buttons_Add(242,120,28,36,(char *)"k",17); + Buttons_Add(274,120,28,36,(char *)"l",18); - Buttons_Add( 50,160,28,36,"z",19); - Buttons_Add( 82,160,28,36,"x",20); - Buttons_Add(114,160,28,36,"c",21); - Buttons_Add(146,160,28,36,"v",22); - Buttons_Add(178,160,28,36,"b",23); - Buttons_Add(210,160,28,36,"n",24); - Buttons_Add(242,160,28,36,"m",25); + Buttons_Add( 50,160,28,36,(char *)"z",19); + Buttons_Add( 82,160,28,36,(char *)"x",20); + Buttons_Add(114,160,28,36,(char *)"c",21); + Buttons_Add(146,160,28,36,(char *)"v",22); + Buttons_Add(178,160,28,36,(char *)"b",23); + Buttons_Add(210,160,28,36,(char *)"n",24); + Buttons_Add(242,160,28,36,(char *)"m",25); - Buttons_Add( 2,160,42,36,"caps",26); + Buttons_Add( 2,160,42,36,(char *)"caps",26); Buttons[26].dark = true; Buttons[26].small = true; Buttons[26].lock = false; - Buttons_Add(276,160,42,36,"del",27); + Buttons_Add(276,160,42,36,(char *)"del",27); Buttons[27].dark = true; Buttons[27].small = true; - Buttons_Add( 2,200,60,36,"123",28); + Buttons_Add( 2,200,60,36,(char *)"123",28); Buttons[28].dark = true; - Buttons_Add( 72,200,28,36,"/",29); - Buttons_Add(108,200,104,36," ",30); - Buttons_Add(220,200,28,36,".",31); - Buttons_Add(258,200,60,36,"Ok",32); + Buttons_Add( 72,200,28,36,(char *)"/",29); + Buttons_Add(108,200,104,36,(char *)" ",30); + Buttons_Add(220,200,28,36,(char *)".",31); + Buttons_Add(258,200,60,36,(char *)"Ok",32); Buttons[32].dark = true; Buttons_Show(); @@ -236,52 +236,52 @@ { Buttons_Clear(); - Buttons_Add( 2, 80,28,36,"Q", 0); - Buttons_Add( 34, 80,28,36,"W", 1); - Buttons_Add( 66, 80,28,36,"E", 2); - Buttons_Add( 98, 80,28,36,"R", 3); - Buttons_Add(130, 80,28,36,"T", 4); - Buttons_Add(162, 80,28,36,"Y", 5); - Buttons_Add(194, 80,28,36,"U", 6); - Buttons_Add(226, 80,28,36,"I", 7); - Buttons_Add(258, 80,28,36,"O", 8); - Buttons_Add(290, 80,28,36,"P", 9); + Buttons_Add( 2, 80,28,36,(char *)"Q", 0); + Buttons_Add( 34, 80,28,36,(char *)"W", 1); + Buttons_Add( 66, 80,28,36,(char *)"E", 2); + Buttons_Add( 98, 80,28,36,(char *)"R", 3); + Buttons_Add(130, 80,28,36,(char *)"T", 4); + Buttons_Add(162, 80,28,36,(char *)"Y", 5); + Buttons_Add(194, 80,28,36,(char *)"U", 6); + Buttons_Add(226, 80,28,36,(char *)"I", 7); + Buttons_Add(258, 80,28,36,(char *)"O", 8); + Buttons_Add(290, 80,28,36,(char *)"P", 9); - Buttons_Add( 18,120,28,36,"A",10); - Buttons_Add( 50,120,28,36,"S",11); - Buttons_Add( 82,120,28,36,"D",12); - Buttons_Add(114,120,28,36,"F",13); - Buttons_Add(146,120,28,36,"G",14); - Buttons_Add(178,120,28,36,"H",15); - Buttons_Add(210,120,28,36,"J",16); - Buttons_Add(242,120,28,36,"K",17); - Buttons_Add(274,120,28,36,"L",18); + Buttons_Add( 18,120,28,36,(char *)"A",10); + Buttons_Add( 50,120,28,36,(char *)"S",11); + Buttons_Add( 82,120,28,36,(char *)"D",12); + Buttons_Add(114,120,28,36,(char *)"F",13); + Buttons_Add(146,120,28,36,(char *)"G",14); + Buttons_Add(178,120,28,36,(char *)"H",15); + Buttons_Add(210,120,28,36,(char *)"J",16); + Buttons_Add(242,120,28,36,(char *)"K",17); + Buttons_Add(274,120,28,36,(char *)"L",18); - Buttons_Add( 50,160,28,36,"Z",19); - Buttons_Add( 82,160,28,36,"X",20); - Buttons_Add(114,160,28,36,"C",21); - Buttons_Add(146,160,28,36,"V",22); - Buttons_Add(178,160,28,36,"B",23); - Buttons_Add(210,160,28,36,"N",24); - Buttons_Add(242,160,28,36,"M",25); + Buttons_Add( 50,160,28,36,(char *)"Z",19); + Buttons_Add( 82,160,28,36,(char *)"X",20); + Buttons_Add(114,160,28,36,(char *)"C",21); + Buttons_Add(146,160,28,36,(char *)"V",22); + Buttons_Add(178,160,28,36,(char *)"B",23); + Buttons_Add(210,160,28,36,(char *)"N",24); + Buttons_Add(242,160,28,36,(char *)"M",25); - Buttons_Add( 2,160,42,36,"caps",26); + Buttons_Add( 2,160,42,36,(char *)"caps",26); Buttons[26].dark = true; Buttons[26].small = true; if (level == 3) Buttons[26].lock = true; else Buttons[26].lock = false; - Buttons_Add(276,160,42,36,"del",27); + Buttons_Add(276,160,42,36,(char *)"del",27); Buttons[27].dark = true; Buttons[27].small = true; - Buttons_Add( 2,200,60,36,"123",28); + Buttons_Add( 2,200,60,36,(char *)"123",28); Buttons[28].dark = true; - Buttons_Add( 72,200,28,36,"/",29); - Buttons_Add(108,204,100,36," ",30); - Buttons_Add(220,200,28,36,".",31); - Buttons_Add(258,200,60,36,"Ok",32); + Buttons_Add( 72,200,28,36,(char *)"/",29); + Buttons_Add(108,204,100,36,(char *)" ",30); + Buttons_Add(220,200,28,36,(char *)".",31); + Buttons_Add(258,200,60,36,(char *)"Ok",32); Buttons[32].dark = true; Buttons_Show(); @@ -300,48 +300,48 @@ { Buttons_Clear(); - Buttons_Add( 2, 80,28,36,"1", 0); - Buttons_Add( 34, 80,28,36,"2", 1); - Buttons_Add( 66, 80,28,36,"3", 2); - Buttons_Add( 98, 80,28,36,"4", 3); - Buttons_Add(130, 80,28,36,"5", 4); - Buttons_Add(162, 80,28,36,"6", 5); - Buttons_Add(194, 80,28,36,"7", 6); - Buttons_Add(226, 80,28,36,"8", 7); - Buttons_Add(258, 80,28,36,"9", 8); - Buttons_Add(290, 80,28,36,"0", 9); + Buttons_Add( 2, 80,28,36,(char *)"1", 0); + Buttons_Add( 34, 80,28,36,(char *)"2", 1); + Buttons_Add( 66, 80,28,36,(char *)"3", 2); + Buttons_Add( 98, 80,28,36,(char *)"4", 3); + Buttons_Add(130, 80,28,36,(char *)"5", 4); + Buttons_Add(162, 80,28,36,(char *)"6", 5); + Buttons_Add(194, 80,28,36,(char *)"7", 6); + Buttons_Add(226, 80,28,36,(char *)"8", 7); + Buttons_Add(258, 80,28,36,(char *)"9", 8); + Buttons_Add(290, 80,28,36,(char *)"0", 9); - Buttons_Add( 2,120,28,36,"!",10); - Buttons_Add( 34,120,28,36,"@",11); - Buttons_Add( 66,120,28,36,"#",12); - Buttons_Add( 98,120,28,36,"$",13); - Buttons_Add(130,120,28,36,"/",14); - Buttons_Add(162,120,28,36,"^",15); - Buttons_Add(194,120,28,36,"&",16); - Buttons_Add(226,120,28,36,"*",17); - Buttons_Add(258,120,28,36,"(",18); - Buttons_Add(290,120,28,36,")",19); + Buttons_Add( 2,120,28,36,(char *)"!",10); + Buttons_Add( 34,120,28,36,(char *)"@",11); + Buttons_Add( 66,120,28,36,(char *)"#",12); + Buttons_Add( 98,120,28,36,(char *)"$",13); + Buttons_Add(130,120,28,36,(char *)"/",14); + Buttons_Add(162,120,28,36,(char *)"^",15); + Buttons_Add(194,120,28,36,(char *)"&",16); + Buttons_Add(226,120,28,36,(char *)"*",17); + Buttons_Add(258,120,28,36,(char *)"(",18); + Buttons_Add(290,120,28,36,(char *)")",19); - Buttons_Add( 50,160,28,36,"-",20); - Buttons_Add( 82,160,28,36,"'",21); - Buttons_Add(114,160,28,36,"\"",22); - Buttons_Add(146,160,28,36,":",23); - Buttons_Add(178,160,28,36,";",24); - Buttons_Add(210,160,28,36,",",25); - Buttons_Add(242,160,28,36,"?",26); + Buttons_Add( 50,160,28,36,(char *)"-",20); + Buttons_Add( 82,160,28,36,(char *)"'",21); + Buttons_Add(114,160,28,36,(char *)"\"",22); + Buttons_Add(146,160,28,36,(char *)":",23); + Buttons_Add(178,160,28,36,(char *)";",24); + Buttons_Add(210,160,28,36,(char *)",",25); + Buttons_Add(242,160,28,36,(char *)"?",26); - Buttons_Add( 2,160,42,36,"1/2",27); + Buttons_Add( 2,160,42,36,(char *)"1/2",27); Buttons[27].dark = true; - Buttons_Add(276,160,42,36,"del",28); + Buttons_Add(276,160,42,36,(char *)"del",28); Buttons[28].dark = true; Buttons[28].small = true; - Buttons_Add( 2,200,60,36,"ABC",29); + Buttons_Add( 2,200,60,36,(char *)"ABC",29); Buttons[29].dark = true; - Buttons_Add( 72,200,28,36,"/",30); - Buttons_Add(108,204,100,36," ",31); - Buttons_Add(220,200,28,36,".",32); - Buttons_Add(258,200,60,36,"Ok",33); + Buttons_Add( 72,200,28,36,(char *)"/",30); + Buttons_Add(108,204,100,36,(char *)" ",31); + Buttons_Add(220,200,28,36,(char *)".",32); + Buttons_Add(258,200,60,36,(char *)"Ok",33); Buttons[33].dark = true; Buttons_Show(); @@ -359,48 +359,48 @@ { Buttons_Clear(); - Buttons_Add( 2, 80,28,36,"+", 0); - Buttons_Add( 34, 80,28,36,"*", 1); - Buttons_Add( 66, 80,28,36,"/", 2); - Buttons_Add( 98, 80,28,36,"=", 3); - Buttons_Add(130, 80,28,36,"<", 4); - Buttons_Add(162, 80,28,36,">", 5); - Buttons_Add(194, 80,28,36,"{", 6); - Buttons_Add(226, 80,28,36,"}", 7); - Buttons_Add(258, 80,28,36,"[", 8); - Buttons_Add(290, 80,28,36,"]", 9); + Buttons_Add( 2, 80,28,36,(char *)"+", 0); + Buttons_Add( 34, 80,28,36,(char *)"*", 1); + Buttons_Add( 66, 80,28,36,(char *)"/", 2); + Buttons_Add( 98, 80,28,36,(char *)"=", 3); + Buttons_Add(130, 80,28,36,(char *)"<", 4); + Buttons_Add(162, 80,28,36,(char *)">", 5); + Buttons_Add(194, 80,28,36,(char *)"{", 6); + Buttons_Add(226, 80,28,36,(char *)"}", 7); + Buttons_Add(258, 80,28,36,(char *)"[", 8); + Buttons_Add(290, 80,28,36,(char *)"]", 9); - Buttons_Add( 2,120,28,36," ",10); - Buttons_Add( 34,120,28,36," ",11); - Buttons_Add( 66,120,28,36," ",12); - Buttons_Add( 98,120,28,36," ",13); - Buttons_Add(130,120,28,36,"%",14); - Buttons_Add(162,120,28,36,"~",15); - Buttons_Add(194,120,28,36,"`",16); - Buttons_Add(226,120,28,36," ",17); - Buttons_Add(258,120,28,36," ",18); - Buttons_Add(290,120,28,36," ",19); + Buttons_Add( 2,120,28,36,(char *)" ",10); + Buttons_Add( 34,120,28,36,(char *)" ",11); + Buttons_Add( 66,120,28,36,(char *)" ",12); + Buttons_Add( 98,120,28,36,(char *)" ",13); + Buttons_Add(130,120,28,36,(char *)"%",14); + Buttons_Add(162,120,28,36,(char *)"~",15); + Buttons_Add(194,120,28,36,(char *)"`",16); + Buttons_Add(226,120,28,36,(char *)" ",17); + Buttons_Add(258,120,28,36,(char *)" ",18); + Buttons_Add(290,120,28,36,(char *)" ",19); - Buttons_Add( 50,160,28,36,"_",20); - Buttons_Add( 82,160,28,36,"\\",21); - Buttons_Add(114,160,28,36,"|",22); - Buttons_Add(146,160,28,36," ",23); - Buttons_Add(178,160,28,36," ",24); - Buttons_Add(210,160,28,36," ",25); - Buttons_Add(242,160,28,36," ",26); + Buttons_Add( 50,160,28,36,(char *)"_",20); + Buttons_Add( 82,160,28,36,(char *)"\\",21); + Buttons_Add(114,160,28,36,(char *)"|",22); + Buttons_Add(146,160,28,36,(char *)" ",23); + Buttons_Add(178,160,28,36,(char *)" ",24); + Buttons_Add(210,160,28,36,(char *)" ",25); + Buttons_Add(242,160,28,36,(char *)" ",26); - Buttons_Add( 2,160,42,36,"2/2",27); + Buttons_Add( 2,160,42,36,(char *)"2/2",27); Buttons[27].dark = true; - Buttons_Add(276,160,42,36,"del",28); + Buttons_Add(276,160,42,36,(char *)"del",28); Buttons[28].dark = true; Buttons[28].small = true; - Buttons_Add( 2,200,60,36,"ABC",29); + Buttons_Add( 2,200,60,36,(char *)"ABC",29); Buttons[29].dark = true; - Buttons_Add( 72,200,28,36,"/",30); - Buttons_Add(108,204,100,36," ",31); - Buttons_Add(220,200,28,36,".",32); - Buttons_Add(258,200,60,36,"Ok",33); + Buttons_Add( 72,200,28,36,(char *)"/",30); + Buttons_Add(108,204,100,36,(char *)" ",31); + Buttons_Add(220,200,28,36,(char *)".",32); + Buttons_Add(258,200,60,36,(char *)"Ok",33); Buttons[33].dark = true; Buttons_Show(); @@ -416,31 +416,31 @@ { Buttons_Clear(); - Buttons_Add( 61,200,147,36,"0", 9); + Buttons_Add( 61,200,147,36,(char *)"0", 9); - Buttons_Add( 61,160,47,36,"1", 0); - Buttons_Add(111,160,47,36,"2", 1); - Buttons_Add(161,160,47,36,"3", 2); - Buttons_Add(211,160,47,36,"+",10); + Buttons_Add( 61,160,47,36,(char *)"1", 0); + Buttons_Add(111,160,47,36,(char *)"2", 1); + Buttons_Add(161,160,47,36,(char *)"3", 2); + Buttons_Add(211,160,47,36,(char *)"+",10); Buttons[10].dark = true; - Buttons_Add( 61,120,47,36,"4", 3); - Buttons_Add(111,120,47,36,"5", 4); - Buttons_Add(161,120,47,36,"6", 5); - Buttons_Add(211,120,47,36,"-",11); + Buttons_Add( 61,120,47,36,(char *)"4", 3); + Buttons_Add(111,120,47,36,(char *)"5", 4); + Buttons_Add(161,120,47,36,(char *)"6", 5); + Buttons_Add(211,120,47,36,(char *)"-",11); Buttons[11].dark = true; - Buttons_Add( 61, 80,47,36,"7", 6); - Buttons_Add(111, 80,47,36,"8", 7); - Buttons_Add(161, 80,47,36,"9", 8); - Buttons_Add(211, 80,47,36,".",12); + Buttons_Add( 61, 80,47,36,(char *)"7", 6); + Buttons_Add(111, 80,47,36,(char *)"8", 7); + Buttons_Add(161, 80,47,36,(char *)"9", 8); + Buttons_Add(211, 80,47,36,(char *)".",12); Buttons[12].dark = true; - Buttons_Add(211,200,47,36,"del",13); + Buttons_Add(211,200,47,36,(char *)"del",13); Buttons[13].dark = true; Buttons[13].small = true; - Buttons_Add(271,200,47,36,"Ok",14); + Buttons_Add(271,200,47,36,(char *)"Ok",14); Buttons[14].dark = true; Buttons_Show(); @@ -582,7 +582,7 @@ _fg = TFT_LIGHTGREY; TFT_print(label, x, y); _fg = TFT_YELLOW; - TFT_print(" ", LASTX, LASTY); + TFT_print((char *)" ", LASTX, LASTY); TFT_print(txt, LASTX, LASTY); } @@ -611,9 +611,9 @@ TFT_print(label, x, y); _fg = TFT_YELLOW; if (val) - TFT_print(" J", LASTX, LASTY); + TFT_print((char *)" J", LASTX, LASTY); else - TFT_print(" N", LASTX, LASTY); + TFT_print((char *)" N", LASTX, LASTY); } @@ -621,9 +621,9 @@ void ShowSSR2(uint16_t x, uint16_t y, int val) { _fg = TFT_LIGHTGREY; - TFT_print("SSR2 ", x, y); + TFT_print((char *)"SSR2 ", x, y); _fg = TFT_YELLOW; - TFT_clearStringRect(TFT_X, TFT_Y, "HLT en MLT"); + TFT_clearStringRect(TFT_X, TFT_Y, (char *)"HLT en MLT"); TFT_print((char *)SSR2Types[val], LASTX, LASTY); } @@ -670,7 +670,7 @@ _bg = TFT_BLACK; TFT_fillScreen(_bg); TFT_resetclipwin(); - TopMessage("Wijzigen"); + TopMessage((char *)"Wijzigen"); _fg = TFT_LIGHTGREY; TFT_setFont(DEFAULT_FONT, NULL); TFT_print(label, 2, 28); @@ -895,17 +895,17 @@ _bg = TFT_BLACK; TFT_fillScreen(_bg); TFT_resetclipwin(); - TopMessage("Wijzigen"); + TopMessage((char *)"Wijzigen"); _fg = TFT_LIGHTGREY; TFT_setFont(DEFAULT_FONT, NULL); TFT_print(label, 2, 28); curpos = TFT_X; _fg = TFT_YELLOW; - (value) ? TFT_print(" J ", curpos, 28) : TFT_print(" N ", curpos, 28); + (value) ? TFT_print((char *)" J ", curpos, 28) : TFT_print((char *)" N ", curpos, 28); Buttons_Clear(); - Buttons_Add( 40, 100, 80, 40, "J/N", 0); - Buttons_Add(200, 100, 80, 40, "Ok", 1); + Buttons_Add( 40, 100, 80, 40, (char *)"J/N", 0); + Buttons_Add(200, 100, 80, 40, (char *)"Ok", 1); Buttons_Show(); while (loop) { @@ -914,10 +914,10 @@ _fg = TFT_YELLOW; if (value) { value = false; - TFT_print(" N ", curpos, 28); + TFT_print((char *)" N ", curpos, 28); } else { value = true; - TFT_print(" J ", curpos, 28); + TFT_print((char *)" J ", curpos, 28); } break; @@ -942,14 +942,14 @@ _bg = TFT_BLACK; TFT_fillScreen(_bg); TFT_resetclipwin(); - TopMessage("Wijzigen"); + TopMessage((char *)"Wijzigen"); Buttons_Clear(); Buttons_Add( 20, 60,120, 40, (char *)SSR2Types[0], 0); Buttons_Add(180, 60,120, 40, (char *)SSR2Types[1], 1); Buttons_Add( 20, 130,120, 40, (char *)SSR2Types[2], 2); Buttons_Add(180, 130,120, 40, (char *)SSR2Types[3], 3); - Buttons_Add(120, 200, 80, 40, "Ok", 4); + Buttons_Add(120, 200, 80, 40, (char *)"Ok", 4); Buttons[4].dark = true; Buttons[value].lock = true; Buttons_Show(); @@ -981,13 +981,13 @@ _bg = TFT_BLACK; TFT_fillScreen(_bg); TFT_resetclipwin(); - TopMessage("Wijzigen"); + TopMessage((char *)"Wijzigen"); Buttons_Clear(); Buttons_Add( 80, 40,160, 40, (char *)mashTypes[0], 0); Buttons_Add( 80, 90,160, 40, (char *)mashTypes[1], 1); Buttons_Add( 80, 140,160, 40, (char *)mashTypes[2], 2); - Buttons_Add(120, 200, 80, 40, "Ok", 3); + Buttons_Add(120, 200, 80, 40, (char *)"Ok", 3); Buttons[3].dark = true; Buttons[value].lock = true; Buttons_Show(); diff -r cf91a3a20d0d -r 7b134c27fadb main/calibration.c --- a/main/calibration.c Sun May 19 21:05:07 2019 +0200 +++ b/main/calibration.c Mon Jul 01 23:15:49 2019 +0200 @@ -41,9 +41,9 @@ { _fg = TFT_ORANGE; TFT_setFont(DEJAVU24_FONT, NULL); - TFT_print("Scherm calibratie", CENTER, 60); + TFT_print((char *)"Scherm calibratie", CENTER, 60); TFT_setFont(DEJAVU18_FONT, NULL); - TFT_print("Druk op de oplichtende stippen", CENTER, 90); + TFT_print((char *)"Druk op de oplichtende stippen", CENTER, 90); } @@ -113,7 +113,7 @@ TFT_fillScreen(TFT_BLACK); TFT_setFont(DEJAVU18_FONT, NULL); - TFT_print("Scherm calibratie is klaar.", CENTER, 60); + TFT_print((char *)"Scherm calibratie is klaar.", CENTER, 60); /* * Calculate the new calibration values. * The testdots were 10 pixels of the corners, @@ -128,7 +128,7 @@ TS_set_calibration(config.ts_xleft, config.ts_xright, config.ts_ytop, config.ts_ybottom); write_config(); - Buttons_Add(130, 200, 60, 40, "Ok", 0); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 0); Buttons_Show(); while (1) { vTaskDelay(20 / portTICK_PERIOD_MS); 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; diff -r cf91a3a20d0d -r 7b134c27fadb main/manual.c --- a/main/manual.c Sun May 19 21:05:07 2019 +0200 +++ b/main/manual.c Mon Jul 01 23:15:49 2019 +0200 @@ -40,22 +40,22 @@ break; case MAIN_MANUAL_MAIN: - TopMessage("Handbediening"); - Buttons_Add( 5, 200, 60, 40, "Stop", 0); + TopMessage((char *)"Handbediening"); + Buttons_Add( 5, 200, 60, 40, (char *)"Stop", 0); Buttons[0].dark = true; uint8_t i = 1; if (_ManualMLT) { MLT_info(71, 26, false); - Buttons_Add( 5, 26, 60, 40, "+sp" , i++); - Buttons_Add(255, 26, 60, 40, "-sp" , i++); - Buttons_Add( 5, 76, 60, 40, "Pomp" , i++); - Buttons_Add(255, 76, 60, 40, "Aan" , i++); + Buttons_Add( 5, 26, 60, 40, (char *)"+sp" , i++); + Buttons_Add(255, 26, 60, 40, (char *)"-sp" , i++); + Buttons_Add( 5, 76, 60, 40, (char *)"Pomp" , i++); + Buttons_Add(255, 76, 60, 40, (char *)"Aan" , i++); } if (_ManualHLT) { HLT_info(71,150, false, false); - Buttons_Add( 5, 150, 60, 40, "+sp" , i++); - Buttons_Add(255, 150, 60, 40, "-sp" , i++); - Buttons_Add(255, 200, 60, 40, "Aan" , i); + Buttons_Add( 5, 150, 60, 40, (char *)"+sp" , i++); + Buttons_Add(255, 150, 60, 40, (char *)"-sp" , i++); + Buttons_Add(255, 200, 60, 40, (char *)"Aan" , i); } Buttons_Show(); break; @@ -77,12 +77,12 @@ switch (Main_Screen) { case MAIN_MANUAL_INIT: _ManualHLT = _ManualMLT = false; - Buttons_Add( 40, 100, 80, 40, "Ja", 0); - Buttons_Add(200, 100, 80, 40, "Nee", 1); + Buttons_Add( 40, 100, 80, 40, (char *)"Ja", 0); + Buttons_Add(200, 100, 80, 40, (char *)"Nee", 1); Buttons_Show(); if ((equipment.SSR2 == SSR2_HLT_SHARE) || (equipment.SSR2 == SSR2_HLT_IND)) { - TopMessage("Spoelwater ketel?"); + TopMessage((char *)"Spoelwater ketel?"); SoundPlay(SOUND_Prompt); loop = true; while (loop) { @@ -101,7 +101,7 @@ } } - TopMessage("Maisch/Kook ketel?"); + TopMessage((char *)"Maisch/Kook ketel?"); SoundPlay(SOUND_Prompt); loop = true; while (loop) { @@ -202,11 +202,11 @@ if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { if (driver_state->hlt_mode == HLT_MODE_BANG) { driver_state->hlt_mode = HLT_MODE_OFF; - Buttons_Add(255, 200, 60, 40, "Aan" , 3); + Buttons_Add(255, 200, 60, 40, (char *)"Aan" , 3); ESP_LOGI(TAG, "HLT turned off"); } else { driver_state->hlt_mode = HLT_MODE_BANG; - Buttons_Add(255, 200, 60, 40, "Uit" , 3); + Buttons_Add(255, 200, 60, 40, (char *)"Uit" , 3); ESP_LOGI(TAG, "HLT turned on"); } xSemaphoreGive(xSemaphoreDriver); @@ -218,11 +218,11 @@ case 4: if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { if (driver_state->mlt_mode == MLT_MODE_PID) { driver_state->mlt_mode = MLT_MODE_OFF; - Buttons_Add(255, 76, 60, 40, "Aan" , 4); + Buttons_Add(255, 76, 60, 40, (char *)"Aan" , 4); ESP_LOGI(TAG, "MLT turned off"); } else { driver_state->mlt_mode = MLT_MODE_PID; - Buttons_Add(255, 76, 60, 40, "Uit" , 4); + Buttons_Add(255, 76, 60, 40, (char *)"Uit" , 4); ESP_LOGI(TAG, "MLT turned on"); } xSemaphoreGive(xSemaphoreDriver); @@ -245,11 +245,11 @@ case 7: if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { if (driver_state->hlt_mode == HLT_MODE_BANG) { driver_state->hlt_mode = HLT_MODE_OFF; - Buttons_Add(255, 200, 60, 40, "Aan" , 7); + Buttons_Add(255, 200, 60, 40, (char *)"Aan" , 7); ESP_LOGI(TAG, "HLT turned off"); } else { driver_state->hlt_mode = HLT_MODE_BANG; - Buttons_Add(255, 200, 60, 40, "Uit" , 7); + Buttons_Add(255, 200, 60, 40, (char *)"Uit" , 7); ESP_LOGI(TAG, "HLT turned on"); } xSemaphoreGive(xSemaphoreDriver); diff -r cf91a3a20d0d -r 7b134c27fadb main/recipes.c --- a/main/recipes.c Sun May 19 21:05:07 2019 +0200 +++ b/main/recipes.c Mon Jul 01 23:15:49 2019 +0200 @@ -51,7 +51,9 @@ { if (! recipe.Additions) { // No entries yet, add the first one. - sprintf(recipe.Addition[recipe.Additions].Name, "%s", Name); + snprintf(recipe.Addition[recipe.Additions].Name, 63, "%s", Name); +// recipe.Addition[recipe.Additions].Name = ""; +// strncat(recipe.Addition[recipe.Additions].Name, Name, 63); recipe.Addition[recipe.Additions].Type = Type; recipe.Addition[recipe.Additions].Time = Time; recipe.Additions++; @@ -62,7 +64,9 @@ for (int i = 0; i < recipe.Additions; i++) { if (recipe.Addition[i].Time == Time) { // Yes, update the name. - snprintf(recipe.Addition[i].Name, 63, "%s, %s", recipe.Addition[i].Name, Name); + //snprintf(recipe.Addition[i].Name, 63, "%s, %s", recipe.Addition[i].Name, Name); + strncat(recipe.Addition[i].Name, ", ", 63 - strlen(recipe.Addition[i].Name)); + strncat(recipe.Addition[i].Name, Name, 63 - strlen(recipe.Addition[i].Name)); return; } } @@ -76,7 +80,7 @@ recipe.Addition[j+1].Type = recipe.Addition[j].Type; recipe.Addition[j+1].Time = recipe.Addition[j].Time; } - sprintf(recipe.Addition[i].Name, "%s", Name); + snprintf(recipe.Addition[i].Name, 63, "%s", Name); recipe.Addition[i].Type = Type; recipe.Addition[i].Time = Time; recipe.Additions++; @@ -85,7 +89,7 @@ } // Just append. - sprintf(recipe.Addition[recipe.Additions].Name, "%s", Name); + snprintf(recipe.Addition[recipe.Additions].Name, 63, "%s", Name); recipe.Addition[recipe.Additions].Type = Type; recipe.Addition[recipe.Additions].Time = Time; recipe.Additions++; @@ -145,7 +149,8 @@ * We are in a recipe */ if ((_xml_depth == 3) && (strcmp("NAME", _xml_element[2]) == 0)) { - snprintf(recipe.Name, 127, "%s", char_data_buffer); + recipe.Name[0] = '\0'; + strncat(recipe.Name, char_data_buffer, 127); } else if ((_xml_depth == 3) && (strcmp("BOIL_TIME", _xml_element[2]) == 0)) { recipe.BoilTime = atoi(char_data_buffer); } else if ((_xml_depth == 5) && (strcmp("HOPS", _xml_element[2]) == 0) && (strcmp("HOP", _xml_element[3]) == 0)) { @@ -444,7 +449,7 @@ switch (Main_Screen) { case MAIN_TOOLS_RECIPE: - TopMessage("Recepten importeren"); + TopMessage((char *)"Recepten importeren"); r_Imported = 0; TFT_setFont(DEFAULT_FONT, NULL); y = 28; @@ -464,10 +469,10 @@ append_recipe(); rename(filename, newname); _fg = TFT_GREEN; - TFT_print(" Ok", LASTX, y); + TFT_print((char *)" Ok", LASTX, y); } else { _fg = TFT_RED; - TFT_print(" Fout", LASTX, y); + TFT_print((char *)" Fout", LASTX, y); } r_Imported++; // Count them all y += 16; @@ -514,7 +519,7 @@ case MAIN_TOOLS_RECIPE: if (r_Imported) { Buttons_Clear(); - Buttons_Add(135, 210, 50, 30, "Ok" , 0); + Buttons_Add(135, 210, 50, 30, (char *)"Ok" , 0); Buttons_Show(); while (true) { @@ -529,23 +534,23 @@ _bg = TFT_BLACK; TFT_fillScreen(_bg); TFT_resetclipwin(); - TopMessage("Recepten"); + TopMessage((char *)"Recepten"); r_UpdateRec = false; read_recipe(r_CurrentRec); TFT_setFont(DEFAULT_FONT, NULL); - ShowText(2, 28, "Naam", recipe.Name); - ShowText(2, 44, "Code", recipe.Code); - ShowInteger(162, 44, "Record", NULL, r_CurrentRec); - ShowInteger(2, 60, "Kooktijd", " min", recipe.BoilTime); - ShowFloat(162, 60, "Koel tot", " C", recipe.CoolTemp, 2); - ShowFloat(2, 76, "Maisch in", " C", recipe.MashStep[0].Temperature, 2); - ShowFloat(162, 76, "Spoelwater", " C", recipe.SpargeTemp, 2); + ShowText(2, 28, (char *)"Naam", recipe.Name); + ShowText(2, 44, (char *)"Code", recipe.Code); + ShowInteger(162, 44, (char *)"Record", NULL, r_CurrentRec); + ShowInteger(2, 60, (char *)"Kooktijd", (char *)" min", recipe.BoilTime); + ShowFloat(162, 60, (char *)"Koel tot", (char *)" C", recipe.CoolTemp, 2); + ShowFloat(2, 76, (char *)"Maisch in", (char *)" C", recipe.MashStep[0].Temperature, 2); + ShowFloat(162, 76, (char *)"Spoelwater", (char *)" C", recipe.SpargeTemp, 2); y = 92; _fg = TFT_WHITE; - TFT_print("Maisch stap", 2, y); - TFT_print("T", 200, y); - TFT_print("Temp.", 220, y); - TFT_print("Rust", 280, y); + TFT_print((char *)"Maisch stap", 2, y); + TFT_print((char *)"T", 200, y); + TFT_print((char *)"Temp.", 220, y); + TFT_print((char *)"Rust", 280, y); _fg = TFT_YELLOW; y += 16; for (int i = 1; i < 8; i++) { @@ -566,53 +571,53 @@ sprintf(tmp, "%d ", recipe.Additions); TFT_print(tmp, 2, y); _fg = TFT_WHITE; - TFT_print("toevoegingen om", LASTX, y); + TFT_print((char *)"toevoegingen om", LASTX, y); _fg = TFT_YELLOW; for (int i = 1; i <= recipe.Additions; i++) { sprintf(tmp, " %d", recipe.Addition[i-1].Time); TFT_print(tmp, LASTX, y); } _fg = TFT_WHITE; - TFT_print(" minuten", LASTX, y); + TFT_print((char *)" minuten", LASTX, y); } else { _fg = TFT_WHITE; - TFT_print("Geen hop toevoegingen.", 2, y); + TFT_print((char *)"Geen hop toevoegingen.", 2, y); } y += 16; if (recipe.Whirlpool9 || recipe.Whirlpool7 || recipe.Whirlpool6 || recipe.Whirlpool2) { _fg = TFT_WHITE; - TFT_print("Whirlpool ", 2, y); + TFT_print((char *)"Whirlpool ", 2, y); _fg = TFT_YELLOW; if (recipe.Whirlpool9) - TFT_print("88+ ", LASTX, y); + TFT_print((char *)"88+ ", LASTX, y); if (recipe.Whirlpool7) - TFT_print("71+ ", LASTX, y); + TFT_print((char *)"71+ ", LASTX, y); if (recipe.Whirlpool6) - TFT_print("60+ ", LASTX, y); + TFT_print((char *)"60+ ", LASTX, y); if (recipe.Whirlpool2) - TFT_print("koud", LASTX, y); + TFT_print((char *)"koud", LASTX, y); } Buttons_Clear(); - Buttons_Add( 0, 210, 45, 30, "Ok" , 0); - Buttons_Add( 46, 210, 45, 30, "+" , 1); + Buttons_Add( 0, 210, 45, 30, (char *)"Ok" , 0); + Buttons_Add( 46, 210, 45, 30, (char *)"+" , 1); if (r_CurrentRec != config.RecipeRec) - Buttons_Add( 92, 210, 45, 30, "-", 2); + Buttons_Add( 92, 210, 45, 30, (char *)"-", 2); else - Buttons_Add( 92, 210, 45, 30, "" , 2); + Buttons_Add( 92, 210, 45, 30, (char *)"" , 2); if (r_CurrentRec > 1) - Buttons_Add(138, 210, 45, 30, "<", 3); + Buttons_Add(138, 210, 45, 30, (char *)"<", 3); else - Buttons_Add(138, 210, 45, 30, "", 3); + Buttons_Add(138, 210, 45, 30, (char *)"", 3); if (r_CurrentRec < r_Records) - Buttons_Add(184, 210, 45, 30, ">", 4); + Buttons_Add(184, 210, 45, 30, (char *)">", 4); else - Buttons_Add(184, 210, 45, 30, "", 4); + Buttons_Add(184, 210, 45, 30, (char *)"", 4); if (r_CurrentRec != config.RecipeRec) - Buttons_Add(230, 210, 45, 30, "Std", 5); + Buttons_Add(230, 210, 45, 30, (char *)"Std", 5); else - Buttons_Add(230, 210, 45, 30, "", 5); - Buttons_Add(276, 210, 45, 30, "Ed" , 6); + Buttons_Add(230, 210, 45, 30, (char *)"", 5); + Buttons_Add(276, 210, 45, 30, (char *)"Ed" , 6); Buttons[0].dark = true; Buttons_Show(); } /* if (r_UpdateRec) */ @@ -701,15 +706,15 @@ dst = (uint8_t*)&recipe; crc1 = crc32_le(0, dst, sizeof(recipe)); - EditText("Naam", recipe.Name, 31); - EditText("Code", recipe.Code, 31); + EditText((char *)"Naam", recipe.Name, 31); + EditText((char *)"Code", recipe.Code, 31); mashsteps = 0; for (int i = 1; i < 7; i++) { if (recipe.MashStep[i].Resttime) mashsteps++; } - EditInt("Maisch stappen", &mashsteps, 1, 6); - EditFloat("Inmaisch temperatuur", &recipe.MashStep[0].Temperature, 38, 74, 2); + EditInt((char *)"Maisch stappen", &mashsteps, 1, 6); + EditFloat((char *)"Inmaisch temperatuur", &recipe.MashStep[0].Temperature, 38, 74, 2); // Round to 0.25 values recipe.MashStep[0].Temperature = ((int)(recipe.MashStep[0].Temperature * 4)) / 4.0; for (int i = 1; i <= mashsteps; i++) { @@ -741,18 +746,18 @@ } } mintemp = recipe.MashStep[mashsteps].Temperature; - EditFloat("Uitmaischen temperatuur", &recipe.MashStep[7].Temperature, mintemp, 80, 2); + EditFloat((char *)"Uitmaischen temperatuur", &recipe.MashStep[7].Temperature, mintemp, 80, 2); recipe.MashStep[7].Temperature = ((int)(recipe.MashStep[7].Temperature * 4)) / 4.0; - EditUint16("Uitmaischen tijd in minuten", &recipe.MashStep[7].Resttime, 1, 15); + EditUint16((char *)"Uitmaischen tijd in minuten", &recipe.MashStep[7].Resttime, 1, 15); recipe.MashStep[7].Ramptime = (int)(recipe.MashStep[7].Temperature - recipe.MashStep[mashsteps].Temperature); // Zero any higher steps to diable them. for (int i = (mashsteps + 1); i < 7; i++) recipe.MashStep[i].Resttime = 0; - EditUint16("Kook tijd in minuten", &recipe.BoilTime, 3, 480); - EditUint8("Hop/kruiden toevoegingen", &recipe.Additions, 1, 10); + EditUint16((char *)"Kook tijd in minuten", &recipe.BoilTime, 3, 480); + EditUint8((char *)"Hop/kruiden toevoegingen", &recipe.Additions, 1, 10); for (uint8_t i = 0; i < recipe.Additions; i++) { - sprintf(tmp, "Toevoeging %d maam", i+1); + sprintf(tmp, "Toevoeging %d naam", i+1); if (strlen(recipe.Addition[i].Name) == 00) { sprintf(recipe.Addition[i].Name, "Hop %d", (int)i+1); } @@ -766,17 +771,17 @@ recipe.Addition[i].Type = ADDITION_HOP; } - EditFloat("Koel temperatuur", &recipe.CoolTemp, 10, 30, 2); + EditFloat((char *)"Koel temperatuur", &recipe.CoolTemp, 10, 30, 2); recipe.CoolTemp = ((int)(recipe.CoolTemp * 4)) / 4.0; - EditFloat("Spoelwater temperatuur", &recipe.SpargeTemp, 75, 98, 2); + EditFloat((char *)"Spoelwater temperatuur", &recipe.SpargeTemp, 75, 98, 2); recipe.SpargeTemp = ((int)(recipe.SpargeTemp * 4)) / 4.0; - EditUint16("Whirlpool 88..100 graden, 0 = niet", &recipe.Whirlpool9, 0, 120); - EditUint16("Whirlpool 71..77 graden, 0 = niet", &recipe.Whirlpool7, 0, 120); - EditUint16("Whirlpool 60..66 graden, 0 = niet", &recipe.Whirlpool6, 0, 120); - EditUint16("Whirlpool koud, 0 = niet", &recipe.Whirlpool2, 0, 120); + EditUint16((char *)"Whirlpool 88..100 graden, 0 = niet", &recipe.Whirlpool9, 0, 120); + EditUint16((char *)"Whirlpool 71..77 graden, 0 = niet", &recipe.Whirlpool7, 0, 120); + EditUint16((char *)"Whirlpool 60..66 graden, 0 = niet", &recipe.Whirlpool6, 0, 120); + EditUint16((char *)"Whirlpool koud, 0 = niet", &recipe.Whirlpool2, 0, 120); crc2 = crc32_le(0, dst, sizeof(recipe)); - if ((crc1 != crc2) && Confirm("Gewijzigd, opslaan?", "Ja", "Nee")) { + if ((crc1 != crc2) && Confirm((char *)"Gewijzigd, opslaan?", (char *)"Ja", (char *)"Nee")) { write_recipe(r_CurrentRec); } Main_Screen = MAIN_TOOLS_RECIPE; diff -r cf91a3a20d0d -r 7b134c27fadb main/setup.c --- a/main/setup.c Sun May 19 21:05:07 2019 +0200 +++ b/main/setup.c Mon Jul 01 23:15:49 2019 +0200 @@ -31,34 +31,34 @@ switch (Main_Screen) { case MAIN_TOOLS_SETUP: - TopMessage("Setup menu"); - Buttons_Add( 20, 40,120, 40, "Config", 0); - Buttons_Add(180, 40,120, 40, "Apparatuur", 1); - Buttons_Add( 20,120,120, 40, "WiFi", 2); - Buttons_Add(180,120,120, 40, "Calibratie", 3); - Buttons_Add(130, 200, 60, 40, "Ok", 4); + TopMessage((char *)"Setup menu"); + Buttons_Add( 20, 40,120, 40, (char *)"Config", 0); + Buttons_Add(180, 40,120, 40, (char *)"Apparatuur", 1); + Buttons_Add( 20,120,120, 40, (char *)"WiFi", 2); + Buttons_Add(180,120,120, 40, (char *)"Calibratie", 3); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 4); Buttons[4].dark = true; Buttons_Show(); break; case MAIN_TOOLS_SETUP_CONFIG: _bg = TFT_BLACK; - TopMessage("Configuratie"); + TopMessage((char *)"Configuratie"); TFT_setFont(DEFAULT_FONT, NULL); - ShowFloat(2, 28, "Kook temp.", "C", config.BoilTemperature, 2); - ShowBool(2, 44, "Vraag mout storten", config.AskAdd); - ShowBool(2, 60, "Vraag mout verwijderen", config.AskRemove); - ShowBool(2, 76, "Vraag Jodium proef", config.AskIodine); - ShowInteger(2, 92, "Jodiumtest wachttijd", " min.", config.IodineTime); - ShowText(2, 108, "Hostnaam", config.hostname); - ShowText(2, 124, "AP SSID", config.ap_ssid); - ShowText(2, 140, "AP pwd", config.ap_pwd); - ShowInteger(2, 156, "AP kanaal", NULL, config.ap_channel); - ShowBool(2, 172, "AP SSID verborgen", config.ap_ssid_hidden); - ShowText(2, 188, "NTP server", config.ntp_server); + ShowFloat(2, 28, (char *)"Kook temp.", (char *)"C", config.BoilTemperature, 2); + ShowBool(2, 44, (char *)"Vraag mout storten", config.AskAdd); + ShowBool(2, 60, (char *)"Vraag mout verwijderen", config.AskRemove); + ShowBool(2, 76, (char *)"Vraag Jodium proef", config.AskIodine); + ShowInteger(2, 92, (char *)"Jodiumtest wachttijd", (char *)" min.", config.IodineTime); + ShowText(2, 108, (char *)"Hostnaam", config.hostname); + ShowText(2, 124, (char *)"AP SSID", config.ap_ssid); + ShowText(2, 140, (char *)"AP pwd", config.ap_pwd); + ShowInteger(2, 156, (char *)"AP kanaal", NULL, config.ap_channel); + ShowBool(2, 172, (char *)"AP SSID verborgen", config.ap_ssid_hidden); + ShowText(2, 188, (char *)"NTP server", config.ntp_server); Buttons_Clear(); - Buttons_Add( 0, 210, 45, 30, "Ok" , 0); - Buttons_Add(276, 210, 45, 30, "Ed" , 1); + Buttons_Add( 0, 210, 45, 30, (char *)"Ok" , 0); + Buttons_Add(276, 210, 45, 30, (char *)"Ed" , 1); Buttons[0].dark = true; Buttons_Show(); break; @@ -67,7 +67,7 @@ break; case MAIN_TOOLS_SETUP_EQUIPMENT: - TopMessage("Apparatuur"); + TopMessage((char *)"Apparatuur"); f = fopen("/spiffs/etc/equipments.conf", "r"); dst = (uint8_t*)&equipment; Records = 0; @@ -140,24 +140,24 @@ case MAIN_TOOLS_SETUP_CO_EDIT: dst = (uint8_t*)&config; crc1 = crc32_le(0, dst, sizeof(config)); - EditFloat("Kook temperatuur", &config.BoilTemperature, 80, 105, 2); + EditFloat((char *)"Kook temperatuur", &config.BoilTemperature, 80, 105, 2); // Round to 0.25 degrees config.BoilTemperature = ((int)(config.BoilTemperature * 4)) / 4.0; - EditBool("Vraag mout storten", &config.AskAdd); - EditBool("Vraag mout verwijderen", &config.AskRemove); - EditBool("Vraag Jodium proef", &config.AskIodine); - EditUint8("Jodium test wachttijd", &config.IodineTime, 0, 120); - EditText("DHCP hostnaam", config.hostname, 31); - EditText("AP SSID", config.ap_ssid, 31); - EditTextMin("AP password", config.ap_pwd, 40, 8); - EditUint8("AP kanaal", &config.ap_channel, 1, 14); + EditBool((char *)"Vraag mout storten", &config.AskAdd); + EditBool((char *)"Vraag mout verwijderen", &config.AskRemove); + EditBool((char *)"Vraag Jodium proef", &config.AskIodine); + EditUint8((char *)"Jodium test wachttijd", &config.IodineTime, 0, 120); + EditText((char *)"DHCP hostnaam", config.hostname, 31); + EditText((char *)"AP SSID", config.ap_ssid, 31); + EditTextMin((char *)"AP password", config.ap_pwd, 40, 8); + EditUint8((char *)"AP kanaal", &config.ap_channel, 1, 14); bool hidden = config.ap_ssid_hidden; - EditBool("AP SSID verborgen", &hidden); + EditBool((char *)"AP SSID verborgen", &hidden); config.ap_ssid_hidden = (uint8_t)hidden; - EditText("Voorkeur NTP server", config.ntp_server, 31); + EditText((char *)"Voorkeur NTP server", config.ntp_server, 31); crc2 = crc32_le(0, dst, sizeof(config)); - if ((crc1 != crc2) && Confirm("Gewijzigd, opslaan?", "Ja", "Nee")) { + if ((crc1 != crc2) && Confirm((char *)"Gewijzigd, opslaan?", (char *)"Ja", (char *)"Nee")) { write_config(); } else { read_config(); @@ -170,48 +170,48 @@ _bg = TFT_BLACK; TFT_fillScreen(_bg); TFT_resetclipwin(); - TopMessage("Apparatuur"); + TopMessage((char *)"Apparatuur"); UpdateRec = false; read_equipment(CurrentRec); TFT_setFont(DEFAULT_FONT, NULL); - ShowText(2, 28, "Naam", equipment.Name); - ShowInteger( 2, 44, "Kook vermogen", "%", equipment.BoilPower); - ShowInteger(161, 44, "Maisch verm.", "%", equipment.MashPower); - ShowInteger( 2, 60, "Pomp cyclus", "m", equipment.PumpCycle); - ShowInteger(161, 60, "Pomp rust", "m", equipment.PumpRest); - ShowBool( 2, 76, "Pomp opwarmen", equipment.PumpPreMash); - ShowBool(161, 76, "Pomp maischen", equipment.PumpOnMash); - ShowBool( 2, 92, "Pomp uitmaischen", equipment.PumpMashOut); - ShowBool(161, 92, "Pomp bij koken", equipment.PumpOnBoil); - ShowInteger(2, 108, "Pomp maxtemp.", "C", equipment.PumpMaxTemp); - ShowBool(161, 108, "PID bij mout weg", equipment.PIDPipe); + ShowText(2, 28, (char *)"Naam", equipment.Name); + ShowInteger( 2, 44, (char *)"Kook vermogen", (char *)"%", equipment.BoilPower); + ShowInteger(161, 44, (char *)"Maisch verm.", (char *)"%", equipment.MashPower); + ShowInteger( 2, 60, (char *)"Pomp cyclus", (char *)"m", equipment.PumpCycle); + ShowInteger(161, 60, (char *)"Pomp rust", (char *)"m", equipment.PumpRest); + ShowBool( 2, 76, (char *)"Pomp opwarmen", equipment.PumpPreMash); + ShowBool(161, 76, (char *)"Pomp maischen", equipment.PumpOnMash); + ShowBool( 2, 92, (char *)"Pomp uitmaischen", equipment.PumpMashOut); + ShowBool(161, 92, (char *)"Pomp bij koken", equipment.PumpOnBoil); + ShowInteger(2, 108, (char *)"Pomp maxtemp.", (char *)"C", equipment.PumpMaxTemp); + ShowBool(161, 108, (char *)"PID bij mout weg", equipment.PIDPipe); ShowSSR2(2, 124, equipment.SSR2); - ShowFloat(161, 124, "Spoelwater", NULL, equipment.TempHLT, 2); - ShowDouble(2, 140, "PID P", NULL, equipment.PID_kP, 3); - ShowBool(161, 140, "PID klassiek", equipment.PID_POn); - ShowDouble(2, 156, "PID I", NULL, equipment.PID_kI, 3); - ShowInteger(161, 156, "Sample tijd", "mS", equipment.SampleTime); - ShowDouble(2, 172, "PID D", NULL, equipment.PID_kD, 3); + ShowFloat(161, 124, (char *)"Spoelwater", NULL, equipment.TempHLT, 2); + ShowDouble(2, 140, (char *)"PID P", NULL, equipment.PID_kP, 3); + ShowBool(161, 140, (char *)"PID klassiek", equipment.PID_POn); + ShowDouble(2, 156, (char *)"PID I", NULL, equipment.PID_kI, 3); + ShowInteger(161, 156, (char *)"Sample tijd", (char *)"mS", equipment.SampleTime); + ShowDouble(2, 172, (char *)"PID D", NULL, equipment.PID_kD, 3); Buttons_Clear(); - Buttons_Add( 0, 210, 45, 30, "Ok" , 0); - Buttons_Add( 46, 210, 45, 30, "+" , 1); + Buttons_Add( 0, 210, 45, 30, (char *)"Ok" , 0); + Buttons_Add( 46, 210, 45, 30, (char *)"+" , 1); if (CurrentRec != config.EquipmentRec) - Buttons_Add( 92, 210, 45, 30, "-", 2); + Buttons_Add( 92, 210, 45, 30, (char *)"-", 2); else - Buttons_Add( 92, 210, 45, 30, "" , 2); + Buttons_Add( 92, 210, 45, 30, (char *)"" , 2); if (CurrentRec > 1) - Buttons_Add(138, 210, 45, 30, "<", 3); + Buttons_Add(138, 210, 45, 30, (char *)"<", 3); else - Buttons_Add(138, 210, 45, 30, "", 3); + Buttons_Add(138, 210, 45, 30, (char *)"", 3); if (CurrentRec < Records) - Buttons_Add(184, 210, 45, 30, ">", 4); + Buttons_Add(184, 210, 45, 30, (char *)">", 4); else - Buttons_Add(184, 210, 45, 30, "", 4); + Buttons_Add(184, 210, 45, 30, (char *)"", 4); if (CurrentRec != config.EquipmentRec) - Buttons_Add(230, 210, 45, 30, "Std", 5); + Buttons_Add(230, 210, 45, 30, (char *)"Std", 5); else - Buttons_Add(230, 210, 45, 30, "", 5); - Buttons_Add(276, 210, 45, 30, "Ed" , 6); + Buttons_Add(230, 210, 45, 30, (char *)"", 5); + Buttons_Add(276, 210, 45, 30, (char *)"Ed" , 6); Buttons[0].dark = true; Buttons_Show(); } @@ -286,31 +286,31 @@ case MAIN_TOOLS_SETUP_EQ_EDIT: dst = (uint8_t*)&equipment; crc1 = crc32_le(0, dst, sizeof(equipment)); - EditText("Naam", equipment.Name, 31); - EditInt("Kook vermogen in %", &equipment.BoilPower, 0, 100); - EditInt("Maisch vermogen in %", &equipment.MashPower, 0, 100); - EditInt("Pomp cyclus minuten", &equipment.PumpCycle, 5, 15); - EditInt("Pomp rust minuten", &equipment.PumpRest, 0, 5); - EditBool("Pomp bij opwarmen", &equipment.PumpPreMash); - EditBool("Pomp bij maischen", &equipment.PumpOnMash); - EditBool("Pomp bij uitmaischen", &equipment.PumpMashOut); - EditBool("Pomp tijdens koken", &equipment.PumpOnBoil); - EditInt("Pomp max. temperatuur", &equipment.PumpMaxTemp, 60, 105); - EditBool("PID by mout verwijderen", &equipment.PIDPipe); + EditText((char *)"Naam", equipment.Name, 31); + EditInt((char *)"Kook vermogen in %", &equipment.BoilPower, 0, 100); + EditInt((char *)"Maisch vermogen in %", &equipment.MashPower, 0, 100); + EditInt((char *)"Pomp cyclus minuten", &equipment.PumpCycle, 5, 15); + EditInt((char *)"Pomp rust minuten", &equipment.PumpRest, 0, 5); + EditBool((char *)"Pomp bij opwarmen", &equipment.PumpPreMash); + EditBool((char *)"Pomp bij maischen", &equipment.PumpOnMash); + EditBool((char *)"Pomp bij uitmaischen", &equipment.PumpMashOut); + EditBool((char *)"Pomp tijdens koken", &equipment.PumpOnBoil); + EditInt((char *)"Pomp max. temperatuur", &equipment.PumpMaxTemp, 60, 105); + EditBool((char *)"PID by mout verwijderen", &equipment.PIDPipe); EditSSR2(&equipment.SSR2); - EditFloat("Spoelwater temp", &equipment.TempHLT, 75, 98, 2); + EditFloat((char *)"Spoelwater temp", &equipment.TempHLT, 75, 98, 2); // Round to 0.25 values. equipment.TempHLT = ((int)(equipment.TempHLT * 4)) / 4.0; - EditBool("PID klassiek", &equipment.PID_POn); - EditDouble("PID P", &equipment.PID_kP, 20, 2000, 3); - EditDouble("PID I", &equipment.PID_kI, 0, 100, 3); - EditDouble("PID D", &equipment.PID_kD, 0, 50000, 3); - EditInt("Sample tijd in mS", &equipment.SampleTime, 1000, 20000); + EditBool((char *)"PID klassiek", &equipment.PID_POn); + EditDouble((char *)"PID P", &equipment.PID_kP, 20, 2000, 3); + EditDouble((char *)"PID I", &equipment.PID_kI, 0, 100, 3); + EditDouble((char *)"PID D", &equipment.PID_kD, 0, 50000, 3); + EditInt((char *)"Sample tijd in mS", &equipment.SampleTime, 1000, 20000); // Round to 250 mSec units. equipment.SampleTime = ((int)(equipment.SampleTime / 250)) * 250; crc2 = crc32_le(0, dst, sizeof(equipment)); - if ((crc1 != crc2) && Confirm("Gewijzigd, opslaan?", "Ja", "Nee")) { + if ((crc1 != crc2) && Confirm((char *)"Gewijzigd, opslaan?", (char *)"Ja", (char *)"Nee")) { write_equipment(equipment.Record); } Main_Screen = MAIN_TOOLS_SETUP_EQUIPMENT; diff -r cf91a3a20d0d -r 7b134c27fadb main/task_http.c --- a/main/task_http.c Sun May 19 21:05:07 2019 +0200 +++ b/main/task_http.c Mon Jul 01 23:15:49 2019 +0200 @@ -61,7 +61,7 @@ */ static void http_sendfile(struct netconn *conn, char *url, char *mod_since, char *ipstr) { - char temp_url[128], temp_url_gz[128], header[128], c_type[32]; + char temp_url[128], temp_url_gz[132], header[256], c_type[32]; struct stat st; off_t filesize; size_t sentsize; @@ -85,7 +85,7 @@ break; } } - sprintf(temp_url_gz, "%s.gz", temp_url); + snprintf(temp_url_gz, 131, "%s.gz", temp_url); /* * Get filesize and date for the response headers. @@ -131,7 +131,7 @@ } if (f == NULL) { ESP_LOGI(TAG, "%s url \'%s\' file \'%s\' not found", ipstr, url, temp_url); - http_error(conn, 404, "Not found", "Not found"); + http_error(conn, 404, (char *)"Not found", (char *)"Not found"); return; } @@ -168,9 +168,9 @@ sprintf(header, "HTTP/1.1 200 OK\r\nContent-type: %s\r\n", c_type); } if (send_gz) { - sprintf(header, "%sContent-Encoding: gzip\r\n", header); + strncat(header, "Content-Encoding: gzip\r\n", 255 - strlen(header)); } - sprintf(header, "%s\r\n", header); // Add last empty line. + strncat(header, "\r\n", 255 - strlen(header)); // Add last empty line. err = netconn_write(conn, header, strlen(header), NETCONN_NOCOPY); if (err != ERR_OK) { ESP_LOGE(TAG, "%s sendfile %s%s err=%d on header write", ipstr, temp_url, (send_gz) ? ".gz":"", err); @@ -373,7 +373,8 @@ struct stat st; bool comma = false; while (de) { - sprintf(temp, "/sdcard/w/log/%s", de->d_name); + snprintf(temp, 63, "/sdcard/w/log/"); + strncat(temp, de->d_name, 63 - strlen(temp)); if (stat(temp, &st) == ESP_OK) { fprintf(dest, "%s{\"File\":\"%s\",\"Size\":%ld,\"Date\":%ld}", (comma)?",":"", de->d_name, st.st_size, st.st_mtime); comma = true; @@ -390,7 +391,7 @@ } else { ESP_LOGE(TAG, "Error %d write /spiffs/w/logfiles.json", errno); } - http_sendfile(conn, "/logfiles.json", NULL, ipstr); + http_sendfile(conn, (char *)"/logfiles.json", NULL, ipstr); netconn_close(conn); netconn_delete(conn); netbuf_delete(inbuf); @@ -421,7 +422,7 @@ // websocket for web UI. if ((strstr(buf,"GET /ws ") && strstr(buf,"Upgrade: websocket"))) { - int nr = ws_server_add_client_protocol(conn, buf, buflen, "/ws", "binary", websock_callback); + int nr = ws_server_add_client_protocol(conn, buf, buflen, (char *)"/ws", (char *)"binary", websock_callback); ESP_LOGI(TAG, "%s new websocket on /ws client: %d", ipstr, nr); netbuf_delete(inbuf); TFTstartWS(nr); @@ -435,9 +436,9 @@ if (strstr(buf, "GET /")) { ESP_LOGI(TAG, "%s request: %s", ipstr, buf); - http_error(conn, 404, "Not found", "Not found"); + http_error(conn, 404, (char *)"Not found", (char *)"Not found"); } else { - http_error(conn, 405, "Invalid method", "Invalid method"); + http_error(conn, 405, (char *)"Invalid method", (char *)"Invalid method"); } } diff -r cf91a3a20d0d -r 7b134c27fadb main/task_sdcard.c --- a/main/task_sdcard.c Sun May 19 21:05:07 2019 +0200 +++ b/main/task_sdcard.c Mon Jul 01 23:15:49 2019 +0200 @@ -16,7 +16,8 @@ #include "driver/sdmmc_host.h" #include "driver/sdspi_host.h" #include "sdmmc_cmd.h" -#include "diskio.h" +#include "diskio_impl.h" +#include "diskio_sdmmc.h" #include "config.h" @@ -91,7 +92,7 @@ void log_json(void) { - char filename[32], strftime_buf[64]; + char filename[64], strftime_buf[64]; FILE *f; bool addcomma = true; @@ -139,7 +140,7 @@ void log_annotation(int annotation_type, char *label) { - char filename[32]; + char filename[64]; char bordercolor[9], color[9], pos[8]; FILE *f; bool addcomma = true; @@ -174,7 +175,7 @@ fclose(f); } - snprintf(json_log->time, 8, "%02d:%02d", Hour, Minute); + snprintf(json_log->time, 11, "%02d:%02d", Hour, Minute); f = fopen(filename, "a"); if (f) { if (addcomma) { @@ -465,7 +466,8 @@ if (dir != NULL) { struct dirent *de = readdir(dir); while (de) { - sprintf(lf, "/spiffs/log/%s", de->d_name); + sprintf(lf, "/spiffs/log/"); + strncat(lf, de->d_name, 31 - strlen(lf)); if (unlink(lf) == ESP_OK) { ESP_LOGI(TAG, "Removed old %s", lf); } diff -r cf91a3a20d0d -r 7b134c27fadb main/task_sdcard.h --- a/main/task_sdcard.h Sun May 19 21:05:07 2019 +0200 +++ b/main/task_sdcard.h Mon Jul 01 23:15:49 2019 +0200 @@ -38,7 +38,7 @@ * @brief JSON log data */ typedef struct { - char time[9]; ///< Time in the brew. + char time[12]; ///< Time in the brew. float mlt_sp; ///< MLT setpoint. float mlt_pv; ///< MLT temperature. int mlt_power; ///< MLT power in % diff -r cf91a3a20d0d -r 7b134c27fadb main/task_sound.c --- a/main/task_sound.c Sun May 19 21:05:07 2019 +0200 +++ b/main/task_sound.c Mon Jul 01 23:15:49 2019 +0200 @@ -48,7 +48,7 @@ for (int i = 1; i <= sound[0]; i += 2) { if (sound != _sound_Startup) { snprintf(msg, 15, "{\"beep\":\"1\"}"); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } gpio_set_level(PIEZO_BUZZER, 1); vTaskDelay(sound[i] / portTICK_PERIOD_MS); diff -r cf91a3a20d0d -r 7b134c27fadb main/task_tft.c --- a/main/task_tft.c Sun May 19 21:05:07 2019 +0200 +++ b/main/task_tft.c Mon Jul 01 23:15:49 2019 +0200 @@ -223,7 +223,7 @@ TFT_print(s_timer, X, Y); _oldTime = Time; snprintf(msg, 31, "{\"timer\":\"%s\"}", s_timer); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } } @@ -241,7 +241,7 @@ TFT_print(s_top_msg, CENTER, 2); font_transparent = 0; snprintf(msg, 63, "{\"top_msg\":\"%s\"}", s_top_msg); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } @@ -264,7 +264,7 @@ TFT_drawRect(x, y, 178, 90, _fg); TFT_drawFastHLine(x, y + 21, 178, _fg); TFT_setFont(DEJAVU18_FONT, NULL); - TFT_print("MLT", x + 67, y + 3); + TFT_print((char *)"MLT", x + 67, y + 3); } if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { @@ -291,7 +291,7 @@ } lon = con; snprintf(msg, 31, "{\"mlt_led\":\"%s\"}", con ? "1":"0"); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } cpump = (Pump_pin) ? true : false; @@ -303,7 +303,7 @@ } lpump = cpump; snprintf(msg, 31, "{\"pump_led\":\"%s\"}", cpump ? "1":"0"); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } if (equipment.SSR2 == SSR2_ON_IDLE) { @@ -316,7 +316,7 @@ } lpwr = cpwr; snprintf(msg, 31, "{\"hlt_led\":\"%s\"}", cpwr ? "1":"0"); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } } @@ -325,23 +325,23 @@ TFT_print(ctemp, x + 5, y + 23); strncpy(ltemp, ctemp, 16); snprintf(msg, 31, "{\"mlt_pv\":\"%s\"}", ctemp); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } TFT_setFont(DEJAVU18_FONT, NULL); if (strcmp(csp, lsp) || (! update)) { - TFT_clearStringRect(x + 5, y + 70, "123.45 sp"); + TFT_clearStringRect(x + 5, y + 70, (char *)"123.45 sp"); TFT_print(csp, x + 5, y + 70); strncpy(lsp, csp, 16); snprintf(msg, 31, "{\"mlt_sp\":\"%s\"}", csp); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } if (strcmp(cpower, lpower) || (! update)) { - TFT_clearStringRect(x + 120, y + 70, "100%"); + TFT_clearStringRect(x + 120, y + 70, (char *)"100%"); TFT_print(cpower, x + 120, y + 70); strncpy(lpower, cpower, 16); snprintf(msg, 31, "{\"mlt_power\":\"%s\"}", cpower); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } } @@ -365,7 +365,7 @@ TFT_drawRect(x, y, 178, H, _fg); TFT_drawFastHLine(x, y + 21, 178, _fg); TFT_setFont(DEJAVU18_FONT, NULL); - TFT_print("HLT", x + 67, y + 3); + TFT_print((char *)"HLT", x + 67, y + 3); } if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { @@ -392,7 +392,7 @@ } lon = con; snprintf(msg, 31, "{\"hlt_led\":\"%s\"}", con ? "1":"0"); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } if (strcmp(ltemp, ctemp) || (! update)) { @@ -405,24 +405,24 @@ } strncpy(ltemp, ctemp, 16); snprintf(msg, 31, "{\"hlt_pv\":\"%s\"}", ctemp); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } H = (small) ? 50 : 70; TFT_setFont(DEJAVU18_FONT, NULL); if (strcmp(csp, lsp) || (! update)) { - TFT_clearStringRect(x + 5, y + H, "123.45 sp"); + TFT_clearStringRect(x + 5, y + H, (char *)"123.45 sp"); TFT_print(csp, x + 5, y + H); strncpy(lsp, csp, 16); snprintf(msg, 31, "{\"hlt_sp\":\"%s\"}", csp); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } if (strcmp(cpower, lpower) || (! update)) { - TFT_clearStringRect(x + 120, y + H, "100%"); + TFT_clearStringRect(x + 120, y + H, (char *)"100%"); TFT_print(cpower, x + 120, y + H); strncpy(lpower, cpower, 16); snprintf(msg, 31, "{\"hlt_power\":\"%s\"}", cpower); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } } @@ -528,7 +528,7 @@ */ Sub_Screen = 0; snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); ESP_LOGI(TAG, "Change screen %d to %d", Old_Screen, Main_Screen); _bg = TFT_BLACK; @@ -539,15 +539,15 @@ switch (Main_Screen) { case MAIN_MODE_FREE: - TopMessage("Hoofdmenu"); + TopMessage((char *)"Hoofdmenu"); MLT_info(71, 26, false); if ((equipment.SSR2 == SSR2_HLT_SHARE) || (equipment.SSR2 == SSR2_HLT_IND)) { HLT_info(71,150, false, false); } - Buttons_Add( 5, 26, 60, 40, "Hand", 0); - Buttons_Add(255, 26, 60, 40, "Auto", 1); - Buttons_Add( 5, 200, 60, 40, "Info", 2); - Buttons_Add(255, 200, 60, 40, "Tools", 3); + Buttons_Add( 5, 26, 60, 40, (char *)"Hand", 0); + Buttons_Add(255, 26, 60, 40, (char *)"Auto", 1); + Buttons_Add( 5, 200, 60, 40, (char *)"Info", 2); + Buttons_Add(255, 200, 60, 40, (char *)"Tools", 3); Buttons_Show(); break; @@ -560,26 +560,26 @@ TopMessage(temp_buf); _fg = TFT_YELLOW; TFT_setFont(UBUNTU16_FONT, NULL); - TFT_print("Written by Michiel Broek (C) 2018\r\n\n", 0, 50); + TFT_print((char *)"Written by Michiel Broek (C) 2018\r\n\n", 0, 50); // ------------------------------------- _fg = TFT_ORANGE; - TFT_print("Parts are written by Chris Morgan,\r\n", 0, LASTY); - TFT_print("Brett Beauregard, Blake Felt, LoBo,\r\n", 0, LASTY); - TFT_print("and David Antliff.\r\n", 0, LASTY); - ShowInteger(1,140, "Free memory", " bytes", esp_get_free_heap_size()); - ShowText(1,158, "IDF version", (char *)esp_get_idf_version()); - Buttons_Add(130, 200, 60, 40, "Ok", 0); + TFT_print((char *)"Parts are written by Chris Morgan,\r\n", 0, LASTY); + TFT_print((char *)"Brett Beauregard, Blake Felt, LoBo,\r\n", 0, LASTY); + TFT_print((char *)"and David Antliff.\r\n", 0, LASTY); + ShowInteger(1,140, (char *)"Free memory", (char *)" bytes", esp_get_free_heap_size()); + ShowText(1,158, (char *)"IDF version", (char *)esp_get_idf_version()); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 0); Buttons[0].dark = true; Buttons_Show(); break; case MAIN_TOOLS: - TopMessage("Tools menu"); - Buttons_Add( 20, 40,120, 40, "Setup", 0); - Buttons_Add( 20,120,120, 40, "Bestanden", 1); - Buttons_Add(180, 40,120, 40, "Recepten", 2); - Buttons_Add(180,120,120, 40, "Updates", 3); - Buttons_Add(130, 200, 60, 40, "Ok", 4); + TopMessage((char *)"Tools menu"); + Buttons_Add( 20, 40,120, 40, (char *)"Setup", 0); + Buttons_Add( 20,120,120, 40, (char *)"Bestanden", 1); + Buttons_Add(180, 40,120, 40, (char *)"Recepten", 2); + Buttons_Add(180,120,120, 40, (char *)"Updates", 3); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 4); Buttons[4].dark = true; Buttons_Show(); break; @@ -674,12 +674,12 @@ if (System_TimeOk && (now != last)) { last = now; strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo); - TFT_setFont(DEJAVU18_FONT, NULL); _bg = TFT_BLACK; _fg = TFT_ORANGE; + TFT_setFont(DEJAVU18_FONT, NULL); TFT_print(strftime_buf, CENTER, 125); snprintf(msg, 63, "{\"timer\":\"%s\"}", strftime_buf); // Fix string termination and only send once/second. - ws_server_send_text_clients("/ws", msg, strlen(msg)); + ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); } break; diff -r cf91a3a20d0d -r 7b134c27fadb main/task_wifi.c --- a/main/task_wifi.c Sun May 19 21:05:07 2019 +0200 +++ b/main/task_wifi.c Mon Jul 01 23:15:49 2019 +0200 @@ -257,7 +257,7 @@ sntp_stop(); if (strlen(config.ntp_server)) sntp_setservername(0, config.ntp_server); - sntp_setservername(1, "pool.ntp.org"); // Will get you servers nearby + sntp_setservername(1, (char *)"pool.ntp.org"); // Will get you servers nearby sntp_set_sync_mode(SNTP_SYNC_MODE_IMMED); sntp_set_time_sync_notification_cb(time_sync_notification_cb); sntp_init(); @@ -610,27 +610,27 @@ switch (Main_Screen) { case MAIN_TOOLS_SETUP_WIFI: - TopMessage("WiFi"); + TopMessage((char *)"WiFi"); TFT_setFont(DEJAVU24_FONT, NULL); _fg = TFT_WHITE; - TFT_print("Momentje ..", CENTER, CENTER); + TFT_print((char *)"Momentje ..", CENTER, CENTER); _wifi_ScanAPs = true; _wifi_ScanDone = false; - Buttons_Add(260, 200, 60, 40, "Ok", 0); + Buttons_Add(260, 200, 60, 40, (char *)"Ok", 0); Buttons[0].dark = true; Buttons_Show(); // Now add the buttons we draw manually. - Buttons_Add( 0, 30, 250, 30, "", 1); - Buttons_Add( 0, 60, 250, 30, "", 2); - Buttons_Add( 0, 90, 250, 30, "", 3); - Buttons_Add( 0,120, 250, 30, "", 4); - Buttons_Add( 0,150, 250, 30, "", 5); - Buttons_Add( 0,180, 250, 30, "", 6); - Buttons_Add( 0,210, 250, 30, "", 7); + Buttons_Add( 0, 30, 250, 30, (char *)"", 1); + Buttons_Add( 0, 60, 250, 30, (char *)"", 2); + Buttons_Add( 0, 90, 250, 30, (char *)"", 3); + Buttons_Add( 0,120, 250, 30, (char *)"", 4); + Buttons_Add( 0,150, 250, 30, (char *)"", 5); + Buttons_Add( 0,180, 250, 30, (char *)"", 6); + Buttons_Add( 0,210, 250, 30, (char *)"", 7); break; case MAIN_TOOLS_SETUP_WIFI_CUR: - TopMessage("WiFi verbinding"); + TopMessage((char *)"WiFi verbinding"); // Get extra information. wifi_ap_record_t ap_info; esp_wifi_sta_get_ap_info(&ap_info); @@ -648,13 +648,13 @@ strcpy(gw, ip4addr_ntoa(&ip_info.gw)); TFT_setFont(DEFAULT_FONT, NULL); _fg = TFT_WHITE; - TFT_print("SSID", 155 - TFT_getStringWidth("SSID"), 40); - TFT_print("Kanaal", 155 - TFT_getStringWidth("Kanaal"), 60); - TFT_print("Rssi", 155 - TFT_getStringWidth("Rssi"), 80); - TFT_print("Mode", 155 - TFT_getStringWidth("Mode"), 100); - TFT_print("IP adres", 155 - TFT_getStringWidth("IP adres"), 120); - TFT_print("Netmask", 155 - TFT_getStringWidth("Netmask"), 140); - TFT_print("Gateway", 155 - TFT_getStringWidth("Gateway"), 160); + TFT_print((char *)"SSID", 155 - TFT_getStringWidth((char *)"SSID"), 40); + TFT_print((char *)"Kanaal", 155 - TFT_getStringWidth((char *)"Kanaal"), 60); + TFT_print((char *)"Rssi", 155 - TFT_getStringWidth((char *)"Rssi"), 80); + TFT_print((char *)"Mode", 155 - TFT_getStringWidth((char *)"Mode"), 100); + TFT_print((char *)"IP adres", 155 - TFT_getStringWidth((char *)"IP adres"), 120); + TFT_print((char *)"Netmask", 155 - TFT_getStringWidth((char *)"Netmask"), 140); + TFT_print((char *)"Gateway", 155 - TFT_getStringWidth((char *)"Gateway"), 160); _fg = TFT_YELLOW; TFT_print((char*)wconfig->sta.ssid, 165, 40); sprintf(pmpt, "%d", ap_info.primary); @@ -667,27 +667,27 @@ TFT_print((char*)netmask, 165, 140); TFT_print((char*)gw, 165, 160); } - Buttons_Add(130, 200, 60, 40, "Ok", 0); + Buttons_Add(130, 200, 60, 40, (char *)"Ok", 0); Buttons[0].dark = true; Buttons_Show(); break; case MAIN_TOOLS_SETUP_WIFI_CON: - TopMessage("WiFi verbinden"); + TopMessage((char *)"WiFi verbinden"); TFT_setFont(DEJAVU18_FONT, NULL); _fg = TFT_WHITE; - TFT_print("SSID", 155 - TFT_getStringWidth("SSID"), 70); + TFT_print((char *)"SSID", 155 - TFT_getStringWidth((char *)"SSID"), 70); _fg = TFT_YELLOW; TFT_print((char*)_wifi_ssid, 165, 70); - Buttons_Add( 0, 200, 100, 40, "Annuleer", 0); - Buttons_Add(110, 200, 100, 40, "Vergeet", 1); - Buttons_Add(220, 200, 100, 40, "Verbind", 2); + Buttons_Add( 0, 200, 100, 40, (char *)"Annuleer", 0); + Buttons_Add(110, 200, 100, 40, (char *)"Vergeet", 1); + Buttons_Add(220, 200, 100, 40, (char *)"Verbind", 2); Buttons_Show(); Buttons[0].dark = true; break; case MAIN_TOOLS_SETUP_WIFI_NEW: - TopMessage("WiFi nieuw"); + TopMessage((char *)"WiFi nieuw"); snprintf(pmpt, 32, "Password for %s", _wifi_ssid); pwd[0] = '\0'; EditTextMin(pmpt, pwd, 64, 8); @@ -698,7 +698,7 @@ TFT_fillScreen(_bg); TFT_setFont(DEJAVU24_FONT, NULL); _fg = TFT_WHITE; - TFT_print("Momentje ..", CENTER, CENTER); + TFT_print((char *)"Momentje ..", CENTER, CENTER); xEventGroupSetBits(xEventGroupWifi, TASK_WIFI_REQUEST_STA_DISCONNECT); vTaskDelay(100 / portTICK_PERIOD_MS); xEventGroupWaitBits(xEventGroupWifi, TASK_WIFI_STA_DISCONNECTED, pdFALSE, pdTRUE, portMAX_DELAY ); @@ -851,7 +851,7 @@ TFT_fillScreen(_bg); TFT_setFont(DEJAVU24_FONT, NULL); _fg = TFT_WHITE; - TFT_print("Momentje ..", CENTER, CENTER); + TFT_print((char *)"Momentje ..", CENTER, CENTER); /* * Disconnect old connections and wait until it's gone. */ diff -r cf91a3a20d0d -r 7b134c27fadb main/updates.c --- a/main/updates.c Sun May 19 21:05:07 2019 +0200 +++ b/main/updates.c Mon Jul 01 23:15:49 2019 +0200 @@ -82,7 +82,7 @@ goto updateerr; } - TFT_print("Begin download.\r\n", 0, LASTY); + TFT_print((char *)"Begin download.\r\n", 0, LASTY); ESP_LOGI(TAG, "Download update %s size %d", update.url, content_length); int binary_file_length = 0; /*deal with all receive packet*/ @@ -117,7 +117,7 @@ if (esp_partition_check_identity(esp_ota_get_running_partition(), update_partition) == true) { ESP_LOGI(TAG, "Already the latest version"); - TFT_print("Already the latest version.\r\n", LASTX, LASTY); + TFT_print((char *)"Already the latest version.\r\n", LASTX, LASTY); goto updateok; } @@ -131,14 +131,14 @@ } ESP_LOGI(TAG, "Prepare to restart system!"); - TFT_print("Rebooting ...", 0, LASTY); + TFT_print((char *)"Rebooting ...", 0, LASTY); vTaskDelay(1000 / portTICK_PERIOD_MS); esp_restart(); return ; updateerr: _fg = TFT_RED; - TFT_print("Error\r\n", 0, LASTY); + TFT_print((char *)"Error\r\n", 0, LASTY); updateok: vTaskDelay(3000 / portTICK_PERIOD_MS); @@ -249,20 +249,20 @@ TFT_setFont(DEJAVU18_FONT, NULL); _fg = TFT_CYAN; - TFT_print("Update /spiffs ", 0, 25); + TFT_print((char *)"Update /spiffs ", 0, 25); rc = rename("/spiffs/version.txt", "/spiffs/version.old"); if ((rc != 0) && (errno == ENOENT)) { /* No old file. */ ESP_LOGI(TAG, "No old /spiffs/version.txt"); /* Download, install old and new */ - DownloadSpiffs("version.txt"); + DownloadSpiffs((char *)"version.txt"); rename("/spiffs/version.txt", "/spiffs/version.old"); - DownloadSpiffs("version.txt"); + DownloadSpiffs((char *)"version.txt"); goto spiffs_update; } - if (DownloadSpiffs("version.txt") < 0) + if (DownloadSpiffs((char *)"version.txt") < 0) goto spiffs_error; /* Compare spiffs/version.old and /spiffs/version.txt */ @@ -280,7 +280,7 @@ } if (strcmp(v1, v2) == 0) { ESP_LOGI(TAG, "/spiffs is up to date"); - TFT_print("Ok\r\n", LASTX, LASTY); + TFT_print((char *)"Ok\r\n", LASTX, LASTY); unlink("/spiffs/version.old"); return; } @@ -290,7 +290,7 @@ * Run the update, get the filelist. */ ESP_LOGI(TAG, "Full /spiffs update"); - rc = DownloadSpiffs("files.list"); + rc = DownloadSpiffs((char *)"files.list"); if (rc < 0) { unlink("/spiffs/version.txt"); rename("/spiffs/version.old", "/spiffs/version.txt"); // So next time we try again. @@ -310,12 +310,12 @@ } fclose(f); unlink("/spiffs/version.old"); - TFT_print("updated\r\n", LASTX, LASTY); + TFT_print((char *)"updated\r\n", LASTX, LASTY); return; spiffs_error: _fg = TFT_RED; - TFT_print("error\r\n", LASTX, LASTY); + TFT_print((char *)"error\r\n", LASTX, LASTY); } @@ -330,7 +330,7 @@ case MAIN_TOOLS_UPDATES: _bg = TFT_BLACK; TFT_fillScreen(_bg); - TopMessage("Update"); + TopMessage((char *)"Update"); break; default: break; diff -r cf91a3a20d0d -r 7b134c27fadb sdkconfig --- a/sdkconfig Sun May 19 21:05:07 2019 +0200 +++ b/sdkconfig Mon Jul 01 23:15:49 2019 +0200 @@ -2,6 +2,7 @@ # Automatically generated file. DO NOT EDIT. # Espressif IoT Development Framework (ESP-IDF) Project Configuration # +CONFIG_IDF_TARGET_ESP32=y CONFIG_IDF_TARGET="esp32" # @@ -13,22 +14,22 @@ CONFIG_APP_COMPILE_TIME_DATE=y # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set -CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y -# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set -CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set +CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set +CONFIG_BOOTLOADER_LOG_LEVEL=3 # CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set # CONFIG_BOOTLOADER_WDT_ENABLE is not set -# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set # CONFIG_SECURE_BOOT_ENABLED is not set -# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_SECURE_FLASH_ENC_ENABLED is not set CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" CONFIG_ESPTOOLPY_BAUD_115200B=y # CONFIG_ESPTOOLPY_BAUD_230400B is not set @@ -38,10 +39,10 @@ CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 CONFIG_ESPTOOLPY_BAUD=115200 CONFIG_ESPTOOLPY_COMPRESSED=y -# CONFIG_FLASHMODE_QIO is not set -# CONFIG_FLASHMODE_QOUT is not set -CONFIG_FLASHMODE_DIO=y -# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set CONFIG_ESPTOOLPY_FLASHMODE="dio" # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set CONFIG_ESPTOOLPY_FLASHFREQ_40M=y @@ -61,15 +62,15 @@ CONFIG_ESPTOOLPY_AFTER_RESET=y # CONFIG_ESPTOOLPY_AFTER_NORESET is not set CONFIG_ESPTOOLPY_AFTER="hard_reset" -# CONFIG_MONITOR_BAUD_9600B is not set -# CONFIG_MONITOR_BAUD_57600B is not set -CONFIG_MONITOR_BAUD_115200B=y -# CONFIG_MONITOR_BAUD_230400B is not set -# CONFIG_MONITOR_BAUD_921600B is not set -# CONFIG_MONITOR_BAUD_2MB is not set -# CONFIG_MONITOR_BAUD_OTHER is not set -CONFIG_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_MONITOR_BAUD=115200 +# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 CONFIG_TEMP_SENSORS_ONEWIRE=y # CONFIG_TEMP_SENSORS_SIMULATOR is not set CONFIG_ONE_WIRE_MLT=27 @@ -85,31 +86,33 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_OFFSET=0x8000 CONFIG_PARTITION_TABLE_MD5=y -CONFIG_OPTIMIZATION_LEVEL_DEBUG=y -# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set -CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y -# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set -# CONFIG_CXX_EXCEPTIONS is not set -CONFIG_STACK_CHECK_NONE=y -# CONFIG_STACK_CHECK_NORM is not set -# CONFIG_STACK_CHECK_STRONG is not set -# CONFIG_STACK_CHECK_ALL is not set -# CONFIG_STACK_CHECK is not set -# CONFIG_WARN_WRITE_STRINGS is not set -CONFIG_DISABLE_GCC8_WARNINGS=y +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +# CONFIG_COMPILER_CXX_EXCEPTIONS is not set +CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set +# CONFIG_COMPILER_STACK_CHECK is not set +CONFIG_COMPILER_WARN_WRITE_STRINGS=y +CONFIG_COMPILER_DISABLE_GCC8_WARNINGS=y # CONFIG_ESP32_APPTRACE_DEST_TRAX is not set CONFIG_ESP32_APPTRACE_DEST_NONE=y # CONFIG_ESP32_APPTRACE_ENABLE is not set CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y # CONFIG_BT_ENABLED is not set -CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 -CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 -CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 -CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 +CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 +CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0 +CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0 +CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0 +CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 +CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1 CONFIG_BT_RESERVE_DRAM=0 # CONFIG_ADC_FORCE_XPD_FSM is not set -CONFIG_ADC2_DISABLE_DAC=y +CONFIG_ADC_DISABLE_DAC=y # CONFIG_SPI_MASTER_IN_IRAM is not set CONFIG_SPI_MASTER_ISR_IN_IRAM=y # CONFIG_SPI_SLAVE_IN_IRAM is not set @@ -120,89 +123,96 @@ CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y # CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set CONFIG_EFUSE_MAX_BLK_LEN=192 -CONFIG_IDF_TARGET_ESP32=y +# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set # CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 -# CONFIG_SPIRAM_SUPPORT is not set -# CONFIG_MEMMAP_TRACEMEM is not set -# CONFIG_MEMMAP_TRACEMEM_TWOBANKS is not set +# CONFIG_ESP32_SPIRAM_SUPPORT is not set +# CONFIG_ESP32_MEMMAP_TRACEMEM is not set +# CONFIG_ESP32_MEMMAP_TRACEMEM_TWOBANKS is not set # CONFIG_ESP32_TRAX is not set -CONFIG_TRACEMEM_RESERVE_DRAM=0x0 -# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set -CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y -CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 -CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048 -CONFIG_MAIN_TASK_STACK_SIZE=3584 -CONFIG_IPC_TASK_STACK_SIZE=1024 -CONFIG_TIMER_TASK_STACK_SIZE=3584 -CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set -CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y -# CONFIG_NEWLIB_NANO_FORMAT is not set -CONFIG_CONSOLE_UART_DEFAULT=y -# CONFIG_CONSOLE_UART_CUSTOM is not set -# CONFIG_CONSOLE_UART_NONE is not set -CONFIG_CONSOLE_UART_NUM=0 -CONFIG_CONSOLE_UART_BAUDRATE=115200 -# CONFIG_ULP_COPROC_ENABLED is not set -CONFIG_ULP_COPROC_RESERVE_MEM=0 +CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 +# CONFIG_ESP32_ULP_COPROC_ENABLED is not set +CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 # CONFIG_ESP32_PANIC_PRINT_HALT is not set CONFIG_ESP32_PANIC_PRINT_REBOOT=y # CONFIG_ESP32_PANIC_SILENT_REBOOT is not set # CONFIG_ESP32_PANIC_GDBSTUB is not set # CONFIG_ESP32_DEBUG_OCDAWARE is not set CONFIG_ESP32_DEBUG_STUBS_ENABLE=y -CONFIG_INT_WDT=y -CONFIG_INT_WDT_TIMEOUT_MS=300 -CONFIG_INT_WDT_CHECK_CPU1=y -CONFIG_TASK_WDT=y -# CONFIG_TASK_WDT_PANIC is not set -CONFIG_TASK_WDT_TIMEOUT_S=5 -CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y -CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y -CONFIG_BROWNOUT_DET=y -CONFIG_BROWNOUT_DET_LVL_SEL_0=y -# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set -CONFIG_BROWNOUT_DET_LVL=0 -CONFIG_REDUCE_PHY_TX_POWER=y +CONFIG_ESP32_BROWNOUT_DET=y +CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set +CONFIG_ESP32_BROWNOUT_DET_LVL=0 +CONFIG_ESP32_REDUCE_PHY_TX_POWER=y CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y -# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set -# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set -# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set +CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 CONFIG_ESP32_XTAL_FREQ_40=y # CONFIG_ESP32_XTAL_FREQ_26 is not set # CONFIG_ESP32_XTAL_FREQ_AUTO is not set CONFIG_ESP32_XTAL_FREQ=40 -# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set -# CONFIG_NO_BLOBS is not set -# CONFIG_ESP_TIMER_PROFILING is not set -# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set -CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set +# CONFIG_ESP32_NO_BLOBS is not set +# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set +# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set # CONFIG_PM_ENABLE is not set CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y CONFIG_ADC_CAL_LUT_ENABLE=y -# CONFIG_EVENT_LOOP_PROFILING is not set -CONFIG_POST_EVENTS_FROM_ISR=y -CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 +CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +CONFIG_ESP_CONSOLE_UART_DEFAULT=y +# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_ESP_CONSOLE_UART_NUM=0 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_INT_WDT=y +CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 +CONFIG_ESP_INT_WDT_CHECK_CPU1=y +CONFIG_ESP_TASK_WDT=y +# CONFIG_ESP_TASK_WDT_PANIC is not set +CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +CONFIG_ETH_USE_ESP32_EMAC=y +CONFIG_ETH_PHY_INTERFACE_RMII=y +# CONFIG_ETH_PHY_INTERFACE_MII is not set +CONFIG_ETH_RMII_CLK_INPUT=y +# CONFIG_ETH_RMII_CLK_OUTPUT is not set +CONFIG_ETH_RMII_CLK_IN_GPIO=0 +CONFIG_ETH_SMI_MDC_GPIO=23 +CONFIG_ETH_SMI_MDIO_GPIO=18 +CONFIG_ETH_PHY_USE_RST=y +CONFIG_ETH_PHY_RST_GPIO=5 +CONFIG_ETH_DMA_BUFFER_SIZE=512 +CONFIG_ETH_DMA_RX_BUFFER_NUM=10 +CONFIG_ETH_DMA_TX_BUFFER_NUM=10 +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set +CONFIG_ESP_EVENT_POST_FROM_ISR=y +CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y # CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 @@ -211,6 +221,7 @@ CONFIG_HTTPD_PURGE_BUF_LEN=32 # CONFIG_HTTPD_LOG_PURGE_DATA is not set # CONFIG_OTA_ALLOW_HTTP is not set +# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 # CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set @@ -237,12 +248,6 @@ # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y # CONFIG_ESP32_ENABLE_COREDUMP is not set -CONFIG_DMA_RX_BUF_NUM=10 -CONFIG_DMA_TX_BUF_NUM=10 -# CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE is not set -CONFIG_EMAC_CHECK_LINK_PERIOD_MS=2000 -CONFIG_EMAC_TASK_PRIORITY=20 -CONFIG_EMAC_TASK_STACK_SIZE=3072 # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set CONFIG_FATFS_CODEPAGE_437=y # CONFIG_FATFS_CODEPAGE_720 is not set @@ -276,20 +281,20 @@ CONFIG_FATFS_FS_LOCK=0 CONFIG_FATFS_TIMEOUT_MS=10000 CONFIG_FATFS_PER_FILE_CACHE=y -CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 -CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 -CONFIG_MB_QUEUE_LENGTH=20 -CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 -CONFIG_MB_SERIAL_BUF_SIZE=256 -CONFIG_MB_SERIAL_TASK_PRIO=10 -# CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set -CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 -CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 -CONFIG_MB_CONTROLLER_STACK_SIZE=4096 -CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 -CONFIG_MB_TIMER_PORT_ENABLED=y -CONFIG_MB_TIMER_GROUP=0 -CONFIG_MB_TIMER_INDEX=0 +CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_FMB_QUEUE_LENGTH=20 +CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048 +CONFIG_FMB_SERIAL_BUF_SIZE=256 +CONFIG_FMB_SERIAL_TASK_PRIO=10 +# CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set +CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 +CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 +CONFIG_FMB_TIMER_PORT_ENABLED=y +CONFIG_FMB_TIMER_GROUP=0 +CONFIG_FMB_TIMER_INDEX=0 # CONFIG_FREERTOS_UNICORE is not set CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF CONFIG_FREERTOS_CORETIMER_0=y @@ -309,10 +314,10 @@ CONFIG_FREERTOS_ISR_STACKSIZE=1536 # CONFIG_FREERTOS_LEGACY_HOOKS is not set CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 -# CONFIG_SUPPORT_STATIC_ALLOCATION is not set -CONFIG_TIMER_TASK_PRIORITY=1 -CONFIG_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION is not set +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y @@ -339,21 +344,22 @@ # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set CONFIG_LOG_DEFAULT_LEVEL=3 CONFIG_LOG_COLORS=y -# CONFIG_L2_TO_L3_COPY is not set +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# CONFIG_LWIP_L2_TO_L3_COPY is not set # CONFIG_LWIP_IRAM_OPTIMIZATION is not set +CONFIG_LWIP_TIMERS_ONDEMAND=y CONFIG_LWIP_MAX_SOCKETS=10 -# CONFIG_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set CONFIG_LWIP_SO_REUSE=y CONFIG_LWIP_SO_REUSE_RXTOALL=y # CONFIG_LWIP_SO_RCVBUF is not set -CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=3 # CONFIG_LWIP_IP_FRAG is not set # CONFIG_LWIP_IP_REASSEMBLY is not set # CONFIG_LWIP_STATS is not set CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y -CONFIG_ESP_GRATUITOUS_ARP=y -CONFIG_GARP_TMR_INTERVAL=60 -CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_ESP_GRATUITOUS_ARP=y +CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set CONFIG_LWIP_DHCPS_LEASE_UNIT=60 @@ -363,29 +369,31 @@ CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 CONFIG_LWIP_MAX_ACTIVE_TCP=16 CONFIG_LWIP_MAX_LISTENING_TCP=16 -CONFIG_TCP_MAXRTX=12 -CONFIG_TCP_SYNMAXRTX=6 -CONFIG_TCP_MSS=1436 -CONFIG_TCP_MSL=60000 -CONFIG_TCP_SND_BUF_DEFAULT=5744 -CONFIG_TCP_WND_DEFAULT=5744 -CONFIG_TCP_RECVMBOX_SIZE=6 -CONFIG_TCP_QUEUE_OOSEQ=y -# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_TCP_OVERSIZE_MSS=y -# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=6 +CONFIG_LWIP_TCP_MSS=1436 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set CONFIG_LWIP_MAX_UDP_PCBS=16 -CONFIG_UDP_RECVMBOX_SIZE=6 -CONFIG_TCPIP_TASK_STACK_SIZE=2560 -CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_PPP_SUPPORT is not set +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560 +CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_LWIP_PPP_SUPPORT is not set # CONFIG_LWIP_MULTICAST_PING is not set # CONFIG_LWIP_BROADCAST_PING is not set CONFIG_LWIP_MAX_RAW_PCBS=16 +CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=3 +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set @@ -419,7 +427,8 @@ CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y # CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set CONFIG_MBEDTLS_SSL_ALPN=y -CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y CONFIG_MBEDTLS_AES_C=y # CONFIG_MBEDTLS_CAMELLIA_C is not set # CONFIG_MBEDTLS_DES_C is not set @@ -458,12 +467,19 @@ # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set # CONFIG_MQTT_CUSTOM_OUTBOX is not set +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set # CONFIG_OPENSSL_DEBUG is not set CONFIG_OPENSSL_ASSERT_DO_NOTHING=y # CONFIG_OPENSSL_ASSERT_EXIT is not set CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set @@ -472,6 +488,11 @@ # CONFIG_SPI_FLASH_VERIFY_WRITE is not set # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set +# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y CONFIG_SPIFFS_MAX_PARTITIONS=3 CONFIG_SPIFFS_CACHE=y CONFIG_SPIFFS_CACHE_WR=y @@ -491,13 +512,14 @@ # CONFIG_SPIFFS_CACHE_DBG is not set # CONFIG_SPIFFS_CHECK_DBG is not set # CONFIG_SPIFFS_TEST_VISUALISATION is not set -CONFIG_IP_LOST_TIMER_INTERVAL=120 +CONFIG_NETIF_IP_LOST_TIMER_INTERVAL=120 CONFIG_TCPIP_LWIP=y CONFIG_UNITY_ENABLE_FLOAT=y CONFIG_UNITY_ENABLE_DOUBLE=y # CONFIG_UNITY_ENABLE_COLOR is not set CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y # CONFIG_UNITY_ENABLE_FIXTURE is not set +# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y # CONFIG_SUPPORT_TERMIOS is not set CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 @@ -510,10 +532,147 @@ CONFIG_WEBSOCKET_SERVER_QUEUE_TIMEOUT=30 CONFIG_WEBSOCKET_SERVER_TASK_STACK_DEPTH=7000 CONFIG_WEBSOCKET_SERVER_TASK_PRIORITY=5 +CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 +# CONFIG_WPA_ENTERPRISE is not set # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set # Deprecated options for backward compatibility CONFIG_TOOLPREFIX="xtensa-esp32-elf-" CONFIG_PYTHON="python" CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y +# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set +CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 +CONFIG_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +# CONFIG_CXX_EXCEPTIONS is not set +CONFIG_STACK_CHECK_NONE=y +# CONFIG_STACK_CHECK_NORM is not set +# CONFIG_STACK_CHECK_STRONG is not set +# CONFIG_STACK_CHECK_ALL is not set +# CONFIG_STACK_CHECK is not set +CONFIG_WARN_WRITE_STRINGS=y +CONFIG_DISABLE_GCC8_WARNINGS=y +CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 +CONFIG_ADC2_DISABLE_DAC=y +# CONFIG_SPIRAM_SUPPORT is not set +# CONFIG_MEMMAP_TRACEMEM is not set +# CONFIG_MEMMAP_TRACEMEM_TWOBANKS is not set +CONFIG_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set +CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y +CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 +# CONFIG_ULP_COPROC_ENABLED is not set +CONFIG_ULP_COPROC_RESERVE_MEM=0 +CONFIG_BROWNOUT_DET=y +CONFIG_BROWNOUT_DET_LVL_SEL_0=y +# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set +CONFIG_BROWNOUT_DET_LVL=0 +CONFIG_REDUCE_PHY_TX_POWER=y +CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y +# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set +# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set +# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set +# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set +# CONFIG_NO_BLOBS is not set +# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048 +CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_IPC_TASK_STACK_SIZE=1024 +CONFIG_TIMER_TASK_STACK_SIZE=3584 +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y +CONFIG_TASK_WDT=y +# CONFIG_TASK_WDT_PANIC is not set +CONFIG_TASK_WDT_TIMEOUT_S=5 +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +# CONFIG_EVENT_LOOP_PROFILING is not set +CONFIG_POST_EVENTS_FROM_ISR=y +CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_MB_QUEUE_LENGTH=20 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 +CONFIG_MB_SERIAL_BUF_SIZE=256 +CONFIG_MB_SERIAL_TASK_PRIO=10 +# CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set +CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_MB_CONTROLLER_STACK_SIZE=4096 +CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 +CONFIG_MB_TIMER_PORT_ENABLED=y +CONFIG_MB_TIMER_GROUP=0 +CONFIG_MB_TIMER_INDEX=0 +# CONFIG_SUPPORT_STATIC_ALLOCATION is not set +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_L2_TO_L3_COPY is not set +# CONFIG_USE_ONLY_LWIP_SELECT is not set +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=6 +CONFIG_TCP_MSS=1436 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_TCP_OVERSIZE_MSS=y +# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=2560 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_PPP_SUPPORT is not set +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set +CONFIG_IP_LOST_TIMER_INTERVAL=120 # End of deprecated options