main/automation.c

changeset 54
7b134c27fadb
parent 43
2079940c3989
child 56
756d1a63d129
--- 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 {

mercurial