Compare commits

..

No commits in common. "6491bd17b7aad6fe2f6ef16f3eee56436b0bfa81" and "20df16be9db46d4acc2947bcb1f3797bc95bbdc6" have entirely different histories.

View File

@ -67,8 +67,6 @@ void zeigeZeit(tm localTime, int x, int y);
void drawMenue(int32_t xs, int32_t sy);
void Menue();
void zeige_IP(int x, int y);
void NoTouchScreen(TouchPoint touch_1);
void listDir(fs::FS &fs, const char * dirname, uint8_t levels) {
Serial.printf("Listing directory: %s\n", dirname);
@ -228,7 +226,7 @@ void testFileIO(fs::FS &fs, const char * path) {
}
// ENDE TEST
int WiFiError = 35;
int WiFiError = 36;
int Versuche;
int interval;
@ -243,7 +241,7 @@ void setup() {
// Start the tft display and set it to black
tft.init();
tft.setRotation(3); //This is the display in landscape
tft.setRotation(1); //This is the display in landscape
// Clear the screen before writing to it
tft.fillScreen(TFT_BLACK);
@ -415,12 +413,9 @@ void loop() {
if (touch.zRaw != 0){
printTouchToSerial2(touch.x, touch.y, touch.xRaw);
if((touch.y >= 15) && (touch.y <= 30)){
if((touch.x >= 15) && (touch.x <= 30)){
//Serial.printf(" Gefunden bei: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
NoTouchScreen(touch);
Menue();
}
if((touch.x >= 275) && (touch.y >= 210)){
Serial.printf(" Gefunden bei: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
Menue();
}
}
@ -524,73 +519,68 @@ void Menue(){
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.println("Interval der Messwert-\nspeicherung in Minuten.");
if (touch.zRaw != 0){
printTouchToSerial2(touch.x, touch.y, touch.xRaw);
if ((touch.y >= 110) && (touch.y <= 145)){
if((touch.x >= 245) && (touch.x <= 280)){
Serial.printf(" Gefunden bei 1: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(11,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(12,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(13,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(11,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(12,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(13,93,34,34,5,TFT_BLACK);
interval = 1;
}
//printTouchToSerial2(touch.x, touch.y, touch.xRaw);
if(((touch.x >= 15) && (touch.x <= 55)) && ((touch.y >= 95) && (touch.y <= 125))){
Serial.printf(" Gefunden bei 1: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(11,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(12,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(13,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(11,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(12,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(13,93,34,34,5,TFT_BLACK);
interval = 1;
}
if((touch.x >= 200) && (touch.x <= 245)){
Serial.printf(" Gefunden bei 2: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(61,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(62,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(63,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(61,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(62,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(63,93,34,34,5,TFT_BLACK);
interval = 5;
}
if((touch.x >= 165) && (touch.x <= 195)){
Serial.printf(" Gefunden bei 3: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(111,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(112,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(113,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(111,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(112,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(113,93,34,34,5,TFT_BLACK);
interval = 10;
}
if((touch.x >= 120) && (touch.x <= 150)){
Serial.printf(" Gefunden bei 4: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(161,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(162,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(163,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(161,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(162,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(163,93,34,34,5,TFT_BLACK);
interval = 30;
}
if((touch.x >= 75) && (touch.x <= 100)){
Serial.printf(" Gefunden bei 5: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(211,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(212,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(213,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(211,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(212,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(213,93,34,34,5,TFT_BLACK);
interval = 60;
}
}
if((touch.y >= 15) && (touch.y <= 30)){
if((touch.x >= 15) && (touch.x <= 30)){
NoTouchScreen(touch);
if(((touch.x >= 65) && (touch.x <= 95)) && ((touch.y >= 95) && (touch.y <= 125))){
Serial.printf(" Gefunden bei 2: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(61,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(62,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(63,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(61,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(62,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(63,93,34,34,5,TFT_BLACK);
interval = 5;
}
if(((touch.x >= 110) && (touch.x <= 140)) && ((touch.y >= 95) && (touch.y <= 125))){
Serial.printf(" Gefunden bei 3: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(111,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(112,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(113,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(111,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(112,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(113,93,34,34,5,TFT_BLACK);
interval = 10;
}
if(((touch.x >= 150) && (touch.x <= 195)) && ((touch.y >= 95) && (touch.y <= 125))){
Serial.printf(" Gefunden bei 4: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(161,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(162,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(163,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(161,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(162,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(163,93,34,34,5,TFT_BLACK);
interval = 30;
}
if(((touch.x >= 200) && (touch.x <= 230)) && ((touch.y >= 95) && (touch.y <= 125))){
Serial.printf(" Gefunden bei 5: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
tft.drawRoundRect(211,91,38,38,5,TFT_GOLD);
tft.drawRoundRect(212,92,36,36,5,TFT_GOLD);
tft.drawRoundRect(213,93,34,34,5,TFT_GOLD);
delay(1000);
tft.drawRoundRect(211,91,38,38,5,TFT_BLACK);
tft.drawRoundRect(212,92,36,36,5,TFT_BLACK);
tft.drawRoundRect(213,93,34,34,5,TFT_BLACK);
interval = 60;
}
if((touch.x >= 275) && (touch.y >= 210)){
Serial.printf(" Gefunden bei: %i : %i : %i \n", touch.y, touch.x, touch.zRaw);
zurueck = false;
}
}
}
}
tft.drawRoundRect(10,90,40,40,5,TFT_GREEN);
tft.drawRoundRect(60,90,40,40,5,TFT_GREEN);
@ -618,11 +608,4 @@ void Menue(){
tft.setTextSize(2);
tft.println(WiFi.localIP());
tft.setTextSize(1);
}
void NoTouchScreen(TouchPoint touch_1){
do{
delay(50);
//Serial.printf(" Gefunden bei --------->: %i : %i : %i \n", touch_1.y, touch_1.x, touch_1.zRaw);
touch_1 = touchscreen.getTouch();
} while(touch_1.zRaw > 0);
}