444 TFT_setFont(DEFAULT_FONT, NULL); |
438 TFT_setFont(DEFAULT_FONT, NULL); |
445 ShowText(2,y,(char *)"Installatie", equipment.Name); |
439 ShowText(2,y,(char *)"Installatie", equipment.Name); |
446 y += 16; |
440 y += 16; |
447 ShowText(2,y,(char *)"Recept", recipe.Name); |
441 ShowText(2,y,(char *)"Recept", recipe.Name); |
448 y += 16; |
442 y += 16; |
449 ShowFloat(2, y, (char *)"Maisch in", (char *)" C", recipe.MashStep[0].Temperature, 2); |
443 ShowFloat(2, y, (char *)"Maisch in", (char *)" C", recipe.MashStep[0].Infuse_temp, 3); |
450 ShowFloat(162, y, (char *)"Spoelwater", (char *)" C", recipe.SpargeTemp, 2); |
444 ShowFloat(162, y, (char *)"Spoelwater", (char *)" C", recipe.SpargeTemp, 2); |
451 y += 16; |
445 y += 16; |
452 _fg = TFT_WHITE; |
446 _fg = TFT_WHITE; |
453 TFT_print((char *)"Maisch stap", 2, y); |
447 TFT_print((char *)"Maisch stap", 2, y); |
454 TFT_print((char *)"T", 200, y); |
448 TFT_print((char *)"T", 200, y); |
455 TFT_print((char *)"Temp.", 220, y); |
449 TFT_print((char *)"Temp.", 220, y); |
456 TFT_print((char *)"Rust", 280, y); |
450 TFT_print((char *)"Rust", 280, y); |
457 _fg = TFT_YELLOW; |
451 _fg = TFT_YELLOW; |
458 y += 16; |
452 y += 16; |
459 for (int i = 1; i < 8; i++) { |
453 for (int i = 0; i < recipe.Mashsteps; i++) { |
460 if (recipe.MashStep[i].Resttime) { |
454 TFT_print(recipe.MashStep[i].Name, 2, y); |
461 TFT_print(recipe.MashStep[i].Name, 2, y); |
455 if (recipe.MashStep[i].Type < 3) |
462 strcpy(tmp, mashTypes[recipe.MashStep[i].Type]); |
456 strcpy(tmp, mashTypes[recipe.MashStep[i].Type]); |
463 tmp[1] = '\0'; |
457 else |
464 TFT_print(tmp, 200, y); |
458 tmp[0] = '?'; |
465 sprintf(tmp, "%.2f", recipe.MashStep[i].Temperature); |
459 tmp[1] = '\0'; |
466 TFT_print(tmp, 220, y); |
460 TFT_print(tmp, 200, y); |
467 sprintf(tmp, "%2d m", recipe.MashStep[i].Resttime); |
461 sprintf(tmp, "%.2f", recipe.MashStep[i].Step_temp); |
468 TFT_print(tmp, 280, y); |
462 TFT_print(tmp, 220, y); |
469 y += 16; |
463 sprintf(tmp, "%2d m", recipe.MashStep[i].Step_time); |
470 } |
464 TFT_print(tmp, 280, y); |
|
465 y += 16; |
471 } |
466 } |
472 ShowInteger(2, y, (char *)"Kooktijd", (char *)" min", recipe.BoilTime); |
467 ShowInteger(2, y, (char *)"Kooktijd", (char *)" min", recipe.BoilTime); |
473 ShowFloat(162, y, (char *)"Koel tot", (char *)" C", recipe.CoolTemp, 2); |
468 ShowFloat(162, y, (char *)"Koel tot", (char *)" C", recipe.CoolTemp, 2); |
474 if (recipe.BoilTime) { |
469 if (recipe.BoilTime) { |
475 y += 16; |
470 y += 16; |
604 Main_Screen = MAIN_AUTO_HEATUP; |
599 Main_Screen = MAIN_AUTO_HEATUP; |
605 break; |
600 break; |
606 |
601 |
607 case MAIN_AUTO_HEATUP: |
602 case MAIN_AUTO_HEATUP: |
608 if (! runtime.UseHLT) { // Skip if HLT is off |
603 if (! runtime.UseHLT) { // Skip if HLT is off |
609 Main_Screen = MAIN_AUTO_MASH_IN; |
604 Main_Screen = MAIN_AUTO_MASH; |
610 break; |
605 break; |
611 } |
606 } |
612 |
607 |
613 MLT_info(71, 26, true); |
608 MLT_info(71, 26, true); |
614 HLT_info(71,150, true, false); |
609 HLT_info(71,150, true, false); |
615 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
610 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
616 if (driver_state->hlt_pv >= driver_state->hlt_sp) { |
611 if (driver_state->hlt_pv >= driver_state->hlt_sp) { |
617 Main_Screen = MAIN_AUTO_MASH_IN; |
612 Main_Screen = MAIN_AUTO_MASH; |
618 driver_state->hlt_sp = recipe.SpargeTemp; // Set final setpoint |
613 driver_state->hlt_sp = recipe.SpargeTemp; // Set final setpoint |
619 log_msg(TAG, "HLT preheat done"); |
614 log_msg(TAG, "HLT preheat done"); |
620 } |
615 } |
621 xSemaphoreGive(xSemaphoreDriver); |
616 xSemaphoreGive(xSemaphoreDriver); |
622 } |
617 } |
623 break; |
618 break; |
624 |
619 |
625 case MAIN_AUTO_MASH_IN: |
620 case MAIN_AUTO_MASH: |
626 case MAIN_AUTO_MASH_1: |
|
627 case MAIN_AUTO_MASH_2: |
|
628 case MAIN_AUTO_MASH_3: |
|
629 case MAIN_AUTO_MASH_4: |
|
630 case MAIN_AUTO_MASH_5: |
|
631 case MAIN_AUTO_MASH_6: |
|
632 case MAIN_AUTO_MASH_OUT: |
|
633 temp_MLT = 0.0; |
621 temp_MLT = 0.0; |
634 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
622 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
635 temp_MLT = driver_state->mlt_pv; |
623 temp_MLT = driver_state->mlt_pv; |
636 |
624 |
637 if (MashState == MASH_ADD || MashState == MASH_REMOVE) { |
625 if (MashState == MASH_ADD || MashState == MASH_REMOVE || MashState == MASH_INFUSE) { |
638 driver_state->pump_run = 0; |
626 driver_state->pump_run = 0; |
639 } else if (MashState != MASH_NONE) { |
627 } else if (MashState != MASH_NONE) { |
640 if (Main_Screen == MAIN_AUTO_MASH_IN) { |
628 if (runtime.MashStep == 0) { |
641 driver_state->pump_run = (equipment.PumpPreMash && ! pumpRest) ? 1 : 0; |
629 driver_state->pump_run = (equipment.PumpPreMash && ! pumpRest) ? 1 : 0; |
642 } else if (Main_Screen == MAIN_AUTO_MASH_OUT) { |
630 } else if (runtime.MashStep == (recipe.Mashsteps -1)) { |
643 driver_state->pump_run = (equipment.PumpMashOut && ! pumpRest) ? 1 : 0; |
631 driver_state->pump_run = (equipment.PumpMashOut && ! pumpRest) ? 1 : 0; |
644 } else { |
632 } else { |
645 driver_state->pump_run = (equipment.PumpOnMash && ! pumpRest) ? 1 : 0; |
633 driver_state->pump_run = (equipment.PumpOnMash && ! pumpRest) ? 1 : 0; |
646 } |
634 } |
647 } |
635 } |
648 xSemaphoreGive(xSemaphoreDriver); |
636 xSemaphoreGive(xSemaphoreDriver); |
649 } |
637 } |
650 if (MashState == MASH_NONE) { |
638 if (MashState == MASH_NONE) { |
651 stageTemp = recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Temperature; |
639 if (runtime.MashStep == 0 && ! runtime.MaltAdded && recipe.MashStep[0].Infuse_temp) { |
652 stageTime = recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Resttime; |
640 stageTemp = recipe.MashStep[0].Infuse_temp; |
|
641 } else { |
|
642 stageTemp = recipe.MashStep[runtime.MashStep].Step_temp; |
|
643 } |
|
644 stageTime = recipe.MashStep[runtime.MashStep].Step_time; |
653 TempReached = false; |
645 TempReached = false; |
654 if (stageTime == 0) { |
|
655 ESP_LOGI(TAG, "Mash step %d skipped", Main_Screen - MAIN_AUTO_MASH_IN); |
|
656 Main_Screen++; |
|
657 break; |
|
658 } |
|
659 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
646 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
660 driver_state->mlt_sp = stageTemp; |
647 driver_state->mlt_sp = stageTemp; |
661 driver_state->mlt_mode = MLT_MODE_PID; |
648 driver_state->mlt_mode = MLT_MODE_PID; |
662 xSemaphoreGive(xSemaphoreDriver); |
649 xSemaphoreGive(xSemaphoreDriver); |
663 } |
650 } |
664 MashState = Sub_Screen = MASH_WAITTEMP; |
651 MashState = Sub_Screen = MASH_WAITTEMP; |
665 snprintf(msg, 255, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); |
652 ESP_LOGI(TAG, "** Step %d Stage %d Malt %s", runtime.MashStep, MashState, runtime.MaltAdded ? (char *)"yes":(char *)"no"); |
|
653 snprintf(msg, 255, "{\"main\":\"%d\",\"sub\":\"%d\",\"step\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen, runtime.MashStep); |
666 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
654 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
667 log_msg(TAG, "Mash step %d type: %s time: %d sp: %4.2f sv: %4.3f", |
655 log_msg(TAG, "Mash step %d type: %s time: %d sp: %6.4f sv: %6.4f", |
668 Main_Screen - MAIN_AUTO_MASH_IN, mashTypes[recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Type], |
656 runtime.MashStep, mashTypes[recipe.MashStep[runtime.MashStep].Type], |
669 stageTime, stageTemp, temp_MLT); |
657 stageTime, stageTemp, temp_MLT); |
670 |
658 |
671 if (Main_Screen > MAIN_AUTO_MASH_IN) { |
659 if (runtime.MashStep) { |
672 // Do not annotate before the log is open. |
660 // Do not annotate before the log is open. |
673 if (Main_Screen == MAIN_AUTO_MASH_OUT) { |
661 if (runtime.MashStep == (recipe.Mashsteps -1)) { |
674 log_annotation(ANNOTATION_STAGE, (char *)"Uitmaischen"); |
662 log_annotation(ANNOTATION_STAGE, (char *)"Uitmaischen"); |
675 } else { |
663 } else { |
676 sprintf(logline, "Maisch: %d", Main_Screen - MAIN_AUTO_MASH_IN); |
664 sprintf(logline, "Maisch: %d", runtime.MashStep); |
677 log_annotation(ANNOTATION_STAGE, logline); |
665 log_annotation(ANNOTATION_STAGE, logline); |
678 } |
666 } |
679 } |
667 } |
680 |
668 |
681 if (strlen(recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Name)) { |
669 if (! runtime.MaltAdded) { |
682 TopMessage(recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Name); |
670 TopMessage((char *)"Opwarmen MLT"); |
|
671 } else if (strlen(recipe.MashStep[runtime.MashStep].Name)) { |
|
672 TopMessage(recipe.MashStep[runtime.MashStep].Name); |
683 } else { |
673 } else { |
684 sprintf(temp_buf, "Maisch stap #%d", Main_Screen - MAIN_AUTO_MASH_IN); |
674 sprintf(temp_buf, "Maisch stap #%d", runtime.MashStep); |
685 TopMessage(temp_buf); |
675 TopMessage(temp_buf); |
686 } |
676 } |
687 if ((Main_Screen > MAIN_AUTO_MASH_IN) && (Main_Screen < MAIN_AUTO_MASH_OUT) && |
677 if (runtime.MashStep && (runtime.MashStep < recipe.Mashsteps) && (recipe.MashStep[runtime.MashStep].Type != MASHTYPE_TEMPERATURE)) { |
688 (recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Type == MASHTYPE_INFUSION)) { |
678 TFT_fillRect(0, 120, 320, 50, TFT_BLACK); |
|
679 Buttons_Clear(); |
689 Buttons_Add( 5,120, 60, 40, (char *)"Halt", 0); |
680 Buttons_Add( 5,120, 60, 40, (char *)"Halt", 0); |
690 Buttons[0].dark = true; |
681 Buttons[0].dark = true; |
691 Buttons_Add(255,120, 60, 40, (char *)"Ok", 1); |
682 Buttons_Add(255,120, 60, 40, (char *)"Ok", 1); |
692 Buttons_Show(); |
683 Buttons_Show(); |
693 _fg = TFT_WHITE; |
684 _fg = TFT_WHITE; |
694 _bg = TFT_BLACK; |
685 _bg = TFT_BLACK; |
695 TFT_setFont(DEJAVU18_FONT, NULL); |
686 TFT_setFont(DEJAVU18_FONT, NULL); |
696 sprintf(temp_buf, "Infuse %.1f L/%.1f C", recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Infusion_amount, |
687 if (recipe.MashStep[runtime.MashStep].Type == MASHTYPE_INFUSION) { |
697 recipe.MashStep[Main_Screen - MAIN_AUTO_MASH_IN].Infusion_temp); |
688 sprintf(temp_buf, "Infusie %.1f L/%.1f C", recipe.MashStep[runtime.MashStep].Infuse_amount, |
|
689 recipe.MashStep[runtime.MashStep].Infuse_temp); |
|
690 MashState = Sub_Screen = MASH_INFUSE; |
|
691 log_msg(TAG, "Mash infusion prompt"); |
|
692 } else if (recipe.MashStep[runtime.MashStep].Type == MASHTYPE_DECOCTION) { |
|
693 sprintf(temp_buf, "Decoctie %.1f Liter", recipe.MashStep[runtime.MashStep].Infuse_amount); |
|
694 MashState = Sub_Screen = MASH_DECOCT; |
|
695 log_msg(TAG, "Mash decoction prompt"); |
|
696 } |
698 TFT_print(temp_buf, CENTER, 135); |
697 TFT_print(temp_buf, CENTER, 135); |
699 SoundPlay(SOUND_Prompt); |
698 SoundPlay(SOUND_Prompt); |
700 MashState = Sub_Screen = MASH_INFUSE; |
699 snprintf(msg, 255, "{\"main\":\"%d\",\"sub\":\"%d\",\"step\":\"%d\",\"timer\":\"%s\"}", |
701 snprintf(msg, 255, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"%s\"}", Main_Screen, Sub_Screen, temp_buf); |
700 Main_Screen, Sub_Screen, runtime.MashStep, temp_buf); |
702 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
701 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
703 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
702 if (recipe.MashStep[runtime.MashStep].Type == MASHTYPE_INFUSION) { |
704 // No heating during the infusion. |
703 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
705 driver_state->mlt_sp = stageTemp; |
704 // No heating during the infusion. |
706 driver_state->mlt_mode = MLT_MODE_OFF; |
705 driver_state->mlt_sp = stageTemp; |
707 xSemaphoreGive(xSemaphoreDriver); |
706 driver_state->mlt_mode = MLT_MODE_OFF; |
|
707 xSemaphoreGive(xSemaphoreDriver); |
|
708 } |
708 } |
709 } |
709 log_msg(TAG, "Mash infusion prompt"); |
|
710 } else { |
710 } else { |
711 Buttons_Add( 5, 30, 60, 40, (char *)"+sp", 0); |
711 Buttons_Add( 5, 30, 60, 40, (char *)"+sp", 0); |
712 Buttons_Add(255, 30, 60, 40, (char *)"-sp", 1); |
712 Buttons_Add(255, 30, 60, 40, (char *)"-sp", 1); |
713 Buttons_Show(); |
713 Buttons_Show(); |
714 } |
714 } |
720 } |
720 } |
721 if ((temp_MLT >= stageTemp) && (Steady > 10)) { |
721 if ((temp_MLT >= stageTemp) && (Steady > 10)) { |
722 SoundPlay(SOUND_TempReached); |
722 SoundPlay(SOUND_TempReached); |
723 TempReached = true; |
723 TempReached = true; |
724 MashState = Sub_Screen = MASH_REST; |
724 MashState = Sub_Screen = MASH_REST; |
725 snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); |
725 ESP_LOGI(TAG, "** Step %d Stage %d Malt %s", runtime.MashStep, MashState, runtime.MaltAdded ? (char *)"yes":(char *)"no"); |
|
726 snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"step\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen, runtime.MashStep); |
726 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
727 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
727 if (Main_Screen == MAIN_AUTO_MASH_IN) { |
728 if (! runtime.MaltAdded && runtime.MashStep == 0) { |
728 TimerSet(0); |
729 TimerSet(0); |
729 } else { |
730 } else { |
730 if (Resume && (runtime.StageTimeLeft < stageTime)) |
731 if (Resume && (runtime.StageTimeLeft < stageTime)) |
731 TimerSet(runtime.StageTimeLeft * 60); |
732 TimerSet(runtime.StageTimeLeft * 60); |
732 else |
733 else |
733 TimerSet(stageTime * 60); |
734 TimerSet(stageTime * 60); |
734 } |
735 } |
735 Resume = false; |
736 Resume = false; |
736 runtime.StageTimeLeft = TimeLeft / 60; |
737 runtime.StageTimeLeft = TimeLeft / 60; |
737 updateRuntime = true; |
738 updateRuntime = true; |
738 log_msg(TAG, "Mash step %d temperature reached, rest %d minutes", Main_Screen - MAIN_AUTO_MASH_IN, TimeLeft / 60); |
739 log_msg(TAG, "Mash step %d temperature reached, rest %d minutes", runtime.MashStep, TimeLeft / 60); |
739 Buttons_Clear(); |
740 Buttons_Clear(); |
740 Buttons_Add( 0, 120, 60, 40, (char *)"+1m", 0); |
741 Buttons_Add( 0, 120, 60, 40, (char *)"+1m", 0); |
741 Buttons_Add(260, 120, 60, 40, (char *)"-1m", 1); |
742 Buttons_Add(260, 120, 60, 40, (char *)"-1m", 1); |
742 Buttons_Show(); |
743 Buttons_Show(); |
743 } |
744 } |
886 } |
904 } |
887 } |
905 } |
888 switch (Buttons_Scan()) { |
906 switch (Buttons_Scan()) { |
889 case 0: Main_Screen = MAIN_AUTO_ABORT; |
907 case 0: Main_Screen = MAIN_AUTO_ABORT; |
890 break; |
908 break; |
891 case 1: Main_Screen++; |
909 case 1: //Main_Screen++; |
|
910 if (MashState == MASH_ADD) { |
|
911 MashState = Sub_Screen = MASH_NONE; |
|
912 runtime.MaltAdded = true; |
|
913 updateRuntime = true; |
|
914 } else if (MashState == MASH_IODINE) { |
|
915 MashState = Sub_Screen = MASH_NONE; |
|
916 runtime.MashStep++; |
|
917 if (runtime.MashStep == recipe.Mashsteps) |
|
918 Main_Screen = MAIN_AUTO_TOBOIL; |
|
919 updateRuntime = true; |
|
920 } else if (MashState == MASH_REMOVE) { |
|
921 Main_Screen = MAIN_AUTO_TOBOIL; |
|
922 } |
|
923 TFT_fillRect(0, 120, 320, 50, TFT_BLACK); |
|
924 Buttons_Clear(); |
|
925 ESP_LOGI(TAG, "** Step %d Stage %d Malt %s", runtime.MashStep, MashState, runtime.MaltAdded ? (char *)"yes":(char *)"no"); |
892 break; |
926 break; |
893 default: break; |
927 default: break; |
894 } |
928 } |
895 if (MashState == MASH_IODINE && TimeLeft == 0) { |
929 if (MashState == MASH_IODINE && TimeLeft == 0) { |
896 Main_Screen++; |
930 MashState = Sub_Screen = MASH_NONE; |
897 } |
931 runtime.MashStep++; |
898 } else if (MashState == MASH_INFUSE) { |
932 if (runtime.MashStep == recipe.Mashsteps) |
|
933 Main_Screen = MAIN_AUTO_TOBOIL; |
|
934 updateRuntime = true; |
|
935 TFT_fillRect(0, 120, 320, 50, TFT_BLACK); |
|
936 Buttons_Clear(); |
|
937 } |
|
938 } else if (MashState == MASH_INFUSE || MashState == MASH_DECOCT) { |
899 switch (Buttons_Scan()) { |
939 switch (Buttons_Scan()) { |
900 case 0: Main_Screen = MAIN_AUTO_ABORT; |
940 case 0: Main_Screen = MAIN_AUTO_ABORT; |
901 break; |
941 break; |
902 case 1: MashState = Sub_Screen = MASH_WAITTEMP; |
942 case 1: |
903 snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); |
943 #ifdef CONFIG_TEMP_SENSORS_SIMULATOR |
904 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
944 if (MashState == MASH_DECOCT) { |
|
945 Fake_MLT = recipe.MashStep[runtime.MashStep].Step_temp - 0.72; // Fake the decoction amt. |
|
946 if (xSemaphoreTake(xSemaphoreDS18B20, 10) == pdTRUE) { |
|
947 ds18b20_state->mlt_temperature = ((int)(Fake_MLT * 16)) / 16.0; |
|
948 xSemaphoreGive(xSemaphoreDS18B20); |
|
949 } |
|
950 } |
|
951 #endif |
905 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
952 if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { |
906 // Start PID again. |
953 // Start PID again. |
907 driver_state->mlt_sp = stageTemp; |
954 driver_state->mlt_sp = stageTemp; |
908 driver_state->mlt_mode = MLT_MODE_PID; |
955 driver_state->mlt_mode = MLT_MODE_PID; |
909 xSemaphoreGive(xSemaphoreDriver); |
956 xSemaphoreGive(xSemaphoreDriver); |
910 } |
957 } |
|
958 TFT_fillRect(0, 120, 320, 50, TFT_BLACK); |
911 Buttons_Clear(); |
959 Buttons_Clear(); |
912 Buttons_Add( 5, 30, 60, 40, (char *)"+sp", 0); |
960 Buttons_Add( 5, 30, 60, 40, (char *)"+sp", 0); |
913 Buttons_Add(255, 30, 60, 40, (char *)"-sp", 1); |
961 Buttons_Add(255, 30, 60, 40, (char *)"-sp", 1); |
914 Buttons_Show(); |
962 Buttons_Show(); |
915 TFT_fillRect(65, 120, 190, 40, TFT_BLACK); |
963 TFT_fillRect(65, 120, 190, 40, TFT_BLACK); |
916 log_annotation(ANNOTATION_EVENT, (char *)"Eind infusie"); |
964 if (MashState == MASH_INFUSE) { |
|
965 log_msg(TAG, "Eind infusie"); |
|
966 log_annotation(ANNOTATION_EVENT, (char *)"Eind infusie"); |
|
967 } else { |
|
968 log_msg(TAG, "Eind decoctie"); |
|
969 log_annotation(ANNOTATION_EVENT, (char *)"Eind decoctie"); |
|
970 } |
|
971 MashState = Sub_Screen = MASH_WAITTEMP; |
|
972 snprintf(msg, 63, "{\"main\":\"%d\",\"sub\":\"%d\",\"step\":\"%d\",\"timer\":\"\"}", |
|
973 Main_Screen, Sub_Screen, runtime.MashStep); |
|
974 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
917 break; |
975 break; |
918 default: break; |
976 default: break; |
919 } |
977 } |
920 } /* MashState */ |
978 } /* MashState */ |
921 MLT_info(71, 26, true); |
979 MLT_info(71, 26, true); |