Skip to content

Commit

Permalink
Merge pull request #408 from LoQue90/fix-displayrotateupright
Browse files Browse the repository at this point in the history
Fix for Displayrotateupright.h
  • Loading branch information
LoQue90 authored Dec 7, 2023
2 parents 8496913 + 4180eb7 commit 325496b
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions src/Displayrotateupright.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,28 @@ void displayLogo(String displaymessagetext, String displaymessagetext2) {
u8g2.drawStr(0, 47, displaymessagetext.c_str());
u8g2.drawStr(0, 55, displaymessagetext2.c_str());

//Rancilio startup logo
switch (machineLogo) {
case 1:
u8g2.drawXBMP(9, 2, startLogoRancilio_width, startLogoRancilio_height, startLogoRancilio_bits);
// Rancilio startup logo
switch (machine) {
case RancilioSilvia: // Rancilio
u8g2.drawXBMP(41, 2, startLogoRancilio_width, startLogoRancilio_height,
startLogoRancilio_bits);
break;

case 2:
u8g2.drawXBMP(0, 2, startLogoGaggia_width, startLogoGaggia_height, startLogoGaggia_bits);
case RancilioSilviaE: // Rancilio
u8g2.drawXBMP(41, 2, startLogoRancilio_width, startLogoRancilio_height,
startLogoRancilio_bits);
break;

case 3:
u8g2.drawXBMP(22, 0, startLogoQuickMill_width, startLogoQuickMill_height, startLogoQuickMill_bits);
case Gaggia: // Gaggia
u8g2.drawXBMP(0, 2, startLogoGaggia_width, startLogoGaggia_height,
startLogoGaggia_bits);
break;
}

case QuickMill: // Quickmill
u8g2.drawXBMP(22, 0, startLogoQuickMill_width, startLogoQuickMill_height,
startLogoQuickMill_bits);
break;
}
u8g2.sendBuffer();
}

Expand Down Expand Up @@ -116,15 +123,15 @@ void displayShottimer(void) {
u8g2.sendBuffer();

}
if (SHOTTIMER == 1 && millis() >= brewTime_last_Millis && // directly after creating brewTime_last_mills (happens when turning off the brew switch, case 43 in the code) should be started
brewTime_last_Millis+brewswitchDelay >= millis() && // should run until millis() has caught up with brewswitchDelay, this can be used to control the display duration
brewTime_last_Millis < totalBrewTime) // if the totalBrewTime is reached automatically, nothing should be done, otherwise wrong time will be displayed because switch is pressed later than totalBrewTime
if (SHOTTIMER == 1 && millis() >= lastbrewTimeMillis && // directly after creating lastbrewTimeMillis (happens when turning off the brew switch, case 43 in the code) should be started
lastbrewTimeMillis+BREWSWITCHDELAY >= millis() && // should run until millis() has caught up with brewswitchDelay, this can be used to control the display duration
lastbrewTimeMillis < totalBrewTime) // if the totalBrewTime is reached automatically, nothing should be done, otherwise wrong time will be displayed because switch is pressed later than totalBrewTime
{
u8g2.clearBuffer();
u8g2.drawXBMP(0, 0, brewlogo_width, brewlogo_height, brewlogo_bits_u8g2);
u8g2.setFont(u8g2_font_profont22_tf);
u8g2.setCursor(5, 70);
u8g2.print((brewTime_last_Millis - startingTime) / 1000, 1);
u8g2.print((lastbrewTimeMillis - startingTime) / 1000, 1);
u8g2.setFont(u8g2_font_profont11_tf);
u8g2.sendBuffer();
}
Expand Down

0 comments on commit 325496b

Please sign in to comment.