295 } |
295 } |
296 |
296 |
297 cpump = (Pump_pin) ? true : false; |
297 cpump = (Pump_pin) ? true : false; |
298 if ((cpump != lpump) || (! update)) { |
298 if ((cpump != lpump) || (! update)) { |
299 if (cpump) { |
299 if (cpump) { |
300 TFT_fillCircle(x + 146, y + 11, 8, _pump); |
300 TFT_fillCircle(x + 11, y + 11, 8, _pump); |
301 } else { |
301 } else { |
302 TFT_fillCircle(x + 146, y + 11, 8, _bg); |
302 TFT_fillCircle(x + 11, y + 11, 8, _bg); |
303 } |
303 } |
304 lpump = cpump; |
304 lpump = cpump; |
305 snprintf(msg, 95, "{\"pump_led\":\"%s\"}", cpump ? "1":"0"); |
305 snprintf(msg, 95, "{\"pump_led\":\"%s\"}", cpump ? "1":"0"); |
306 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
306 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
307 } |
307 } |
528 */ |
528 */ |
529 Sub_Screen = 0; |
529 Sub_Screen = 0; |
530 snprintf(msg, 95, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); |
530 snprintf(msg, 95, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); |
531 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
531 ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); |
532 |
532 |
533 ESP_LOGI(TAG, "Change screen %d to %d", Old_Screen, Main_Screen); |
533 ESP_LOGD(TAG, "Change screen %d to %d", Old_Screen, Main_Screen); |
534 _bg = TFT_BLACK; |
534 _bg = TFT_BLACK; |
535 TFT_fillScreen(_bg); |
535 TFT_fillScreen(_bg); |
536 TFT_resetclipwin(); |
536 TFT_resetclipwin(); |
537 Buttons_Clear(); |
537 Buttons_Clear(); |
538 Old_Screen = Main_Screen; |
538 Old_Screen = Main_Screen; |