Skip to content

Commit

Permalink
master
Browse files Browse the repository at this point in the history
  • Loading branch information
murmeltier08 committed Feb 9, 2021
1 parent bbd59f9 commit 5d78f91
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
15 changes: 11 additions & 4 deletions rancilio-pid/display.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#if (DISPLAY == 1 || DISPLAY == 2)

int displaystatus = 0 ;
/********************************************************
initialize u8g2 display
*****************************************************/
Expand Down Expand Up @@ -89,15 +90,17 @@
}
void displayShottimer(void)
{
if (
(
displaystatus = 0 ;// Indiktator für Reset Bezug im Display
if
((
(bezugsZeit > 0 && ONLYPID == 1) || // Bezugszeit bei Only PID
(ONLYPID == 0 && brewcounter > 10 && brewcounter <= 42) // oder Bezug bei nicht only PID über brewcounter
) && SHOTTIMER == 1
) // Shotimer muss 1 = True sein und Bezug vorliegen
{
// Dann Zeit anzeigen
u8g2.clearBuffer();
displaystatus = 1 ;// Indiktator für Bezug im Display
// u8g2.drawXBMP(0, 0, logo_width, logo_height, logo_bits_u8g2); //draw temp icon
u8g2.drawXBMP(0, 0, brewlogo_width, brewlogo_height, brewlogo_bits_u8g2);
u8g2.setFont(u8g2_font_profont22_tf);
Expand All @@ -111,7 +114,8 @@
bezugszeit_last_Millis+brewswitchDelay >= millis() && // soll solange laufen, bis millis() den brewswitchDelay aufgeholt hat, damit kann die Anzeigedauer gesteuert werden
bezugszeit_last_Millis < totalbrewtime) // wenn die totalbrewtime automatisch erreicht wird, soll nichts gemacht werden, da sonst falsche Zeit angezeigt wird, da Schalter später betätigt wird als totalbrewtime
{
u8g2.clearBuffer();
displaystatus = 1 ;// Indiktator für Bezug im Display
u8g2.clearBuffer();
u8g2.drawXBMP(0, 0, brewlogo_width, brewlogo_height, brewlogo_bits_u8g2);
u8g2.setFont(u8g2_font_profont22_tf);
u8g2.setCursor(64, 25);
Expand Down Expand Up @@ -202,7 +206,10 @@
}
void OFFlogo(void)
{
if (OFFLINEGLOGO == 1 && pidON == 0)
if (
(OFFLINEGLOGO == 1 && pidON == 0) &&
displaystatus == 0
)
{
u8g2.clearBuffer();
u8g2.drawXBMP(38,0, OFFLogo_width, OFFLogo_height, OFFLogo);
Expand Down
18 changes: 9 additions & 9 deletions rancilio-pid/userConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define MACHINELOGO 1 // 1 = Rancilio, 2 = Gaggia
#define DISPALYROTATE U8G2_R0 // rotate display clockwise: U8G2_R0 = no rotation; U8G2_R1 = 90°; U8G2_R2 = 180°; U8G2_R3 = 270°
#define SHOTTIMER 1 // 0 = deactivated, 1 = SHOTTIMER
#define HEATINGLOGO 1 // 0 = deactivated, 1 = HEATINGLOGO Rancilio 2: HEATINGLOGO Gaggia
#define HEATINGLOGO 2 // 0 = deactivated, 1 = HEATINGLOGO Rancilio 2: HEATINGLOGO Gaggia
#define OFFLINEGLOGO 1 // 0 = deactivated, 1 = offline Logo
#define BREWSWITCHDELAY 3000 // time in ms

Expand All @@ -42,30 +42,30 @@
#define PINETRIGGER 16 // Pin for Etrigger Relay
#define TRIGGERRELAYTYPE HIGH // LOW = low trigger, HIGH = high trigger relay for ETrigger


// Wifi
#define HOSTNAME "Rancilio"
#define D_SSID "myssid"
#define PASS "mypass"
#define D_SSID "FRITZ!Box 7560 TW"
#define PASS "73529858617456203989"

// OTA
#define OTAHOST "Rancilio" // Name to be shown in ARUDINO IDE Port
#define OTAPASS "otapass" // Password for OTA updtates
#define OTAPASS "12345" // Password for OTA updtates

//MQTT
#define MQTT_USERNAME "myuser"
#define MQTT_PASSWORD "mypass"
#define MQTT_PASSWORD "mqtt"
#define MQTT_TOPIC_PREFIX "custom/Küche." // topic will be "<MQTT_TOPIC_PREFIX><HOSTNAME>/<READING>"
#define MQTT_SERVER_IP "XXX.XXX.XXX.XXX" // IP-Address of locally installed mqtt server
#define MQTT_SERVER_IP "192.168.2.170" // IP-Address of locally installed mqtt server
#define MQTT_SERVER_PORT 1883

// BLynk
#define AUTH "myauth"
#define BLYNKADDRESS "blynk.clevercoffee.de" // IP-Address of used blynk server
#define AUTH "296da16b0626443caf96bff568be4ead"
#define BLYNKADDRESS "192.168.2.170" // IP-Address of used blynk server
#define BLYNKPORT 8080 //Port for blynk server




//PID - offline values
#define SETPOINT 95 // Temperatur setpoint
#define AGGKP 69 // Kp Normal
Expand Down

0 comments on commit 5d78f91

Please sign in to comment.