diff --git a/rancilio-pid/Displaytemplateminimal.h b/rancilio-pid/Displaytemplateminimal.h index 04020e081..81cb373e8 100644 --- a/rancilio-pid/Displaytemplateminimal.h +++ b/rancilio-pid/Displaytemplateminimal.h @@ -6,7 +6,6 @@ void printScreen() unsigned long currentMillisDisplay = millis(); if ( - (currentMillisDisplay - previousMillisDisplay >= intervalDisplay) && (machinestate == 19 || machinestate == 20 || machinestate == 35) || ((machinestate == 30 || machinestate == 31) && SHOTTIMER == 0) ||// shottimer == 0, auch Bezug anzeigen ((machinestate == 10) && HEATINGLOGO == 0) diff --git a/rancilio-pid/Displaytemplatestandard.h b/rancilio-pid/Displaytemplatestandard.h index af8d4c0ef..cdbec5956 100644 --- a/rancilio-pid/Displaytemplatestandard.h +++ b/rancilio-pid/Displaytemplatestandard.h @@ -10,14 +10,12 @@ void printScreen() unsigned long currentMillisDisplay = millis(); if ( - (currentMillisDisplay - previousMillisDisplay >= intervalDisplay) && (machinestate == 19 || machinestate == 20 || machinestate == 35) || ((machinestate == 30 || machinestate == 31) && SHOTTIMER == 0) ||// shottimer == 0, auch Bezug anzeigen ((machinestate == 10) && HEATINGLOGO == 0) ) { - previousMillisDisplay = currentMillisDisplay; - + u8g2.clearBuffer(); u8g2.setFont(u8g2_font_profont11_tf); // set font u8g2.drawXBMP(0, 0, logo_width, logo_height, logo_bits_u8g2); //draw temp icon diff --git a/rancilio-pid/Displaytemplatetemponly.h b/rancilio-pid/Displaytemplatetemponly.h index 592a0764c..967f46974 100644 --- a/rancilio-pid/Displaytemplatetemponly.h +++ b/rancilio-pid/Displaytemplatetemponly.h @@ -7,13 +7,12 @@ void printScreen() unsigned long currentMillisDisplay = millis(); if ( - (currentMillisDisplay - previousMillisDisplay >= intervalDisplay) && (machinestate == 19 || machinestate == 20 || machinestate == 35) || ((machinestate == 30 || machinestate == 31) && SHOTTIMER == 0) ||// shottimer == 0, auch Bezug anzeigen ((machinestate == 10) && HEATINGLOGO == 0) ) { - previousMillisDisplay = currentMillisDisplay; + if (!sensorError) { u8g2.clearBuffer(); //draw outline frame diff --git a/rancilio-pid/Displaytemplateupright.h b/rancilio-pid/Displaytemplateupright.h index 17556c35b..76229b6b6 100644 --- a/rancilio-pid/Displaytemplateupright.h +++ b/rancilio-pid/Displaytemplateupright.h @@ -7,13 +7,12 @@ void printScreen() unsigned long currentMillisDisplay = millis(); if ( - (currentMillisDisplay - previousMillisDisplay >= intervalDisplay) && (machinestate == 19 || machinestate == 20 || machinestate == 35) || ((machinestate == 30 || machinestate == 31) && SHOTTIMER == 0) ||// shottimer == 0, auch Bezug anzeigen ((machinestate == 10) && HEATINGLOGO == 0) ) { - previousMillisDisplay = currentMillisDisplay; + if (!sensorError) { u8g2.clearBuffer(); u8g2.setCursor(1, 14); diff --git a/rancilio-pid/rancilio-pid.ino b/rancilio-pid/rancilio-pid.ino index c257983c6..55fb19ce4 100644 --- a/rancilio-pid/rancilio-pid.ino +++ b/rancilio-pid/rancilio-pid.ino @@ -254,7 +254,7 @@ DeviceAddress sensorDeviceAddress; // arrays to hold device address uint16_t temperature = 0; // internal variable used to read temeprature float Temperatur_C = 0; // internal variable that holds the converted temperature in °C -#if (ONE_WIRE_BUS == 16 && TEMPSENSOR == 2) +#if (ONE_WIRE_BUS == 16 && TEMPSENSOR == 2 && defined(ESP8266)) TSIC Sensor1(ONE_WIRE_BUS); // only Signalpin, VCCpin unused by default #else ZACwire Sensor2(306); // set pin "2" to receive signal from the TSic "306" @@ -641,7 +641,7 @@ void refreshTemp() { getTemperature only updates if data is valid, otherwise "temperature" will still hold old values */ temperature = 0; - #if (ONE_WIRE_BUS == 16) + #if (ONE_WIRE_BUS == 16 && defined(ESP8266)) Sensor1.getTemperature(&temperature); Temperatur_C = Sensor1.calc_Celsius(&temperature); #endif @@ -1929,7 +1929,7 @@ void looppid() { brew(); //start brewing if button pressed checkSteamON(); // check for steam sendToBlynk(); - machinestatevoid() ; // calc machinestaze + machinestatevoid() ; // calc machinestate if(ETRIGGER == 1) // E-Trigger active then void Etrigger() { ETriggervoid(); @@ -1950,14 +1950,21 @@ void looppid() { if (!sensorError && Input > 0 && !emergencyStop && backflushState == 10 && (backflushON == 0 || brewcounter > 10)) { brewdetection(); //if brew detected, set PID values #if DISPLAY != 0 + unsigned long currentMillisDisplay = millis(); + if (currentMillisDisplay - previousMillisDisplay >= 100) + { displayShottimer() ; - #if DISPLAYTEMPLATE < 20 // not in vertikal template - heatinglogo(); - #endif - OFFlogo(); - steamLogo(); - printScreen(); // refresh display + } + if (currentMillisDisplay - previousMillisDisplay >= intervalDisplay) { + previousMillisDisplay = currentMillisDisplay; + #if DISPLAYTEMPLATE < 20 // not in vertikal template + heatinglogo(); + OFFlogo(); + steamLogo(); + #endif + printScreen(); // refresh display #endif + } //Set PID if first start of machine detected, and no SteamON if ((Input < BrewSetPoint) && kaltstart && SteamON == 0) { if (startTn != 0) {