Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Displayrotateupright.h #408

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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