Formatting and lcd contrast masking
This commit is contained in:
@ -198,16 +198,16 @@ static void lcd_implementation_init()
|
||||
u8g.setContrast(lcd_contrast);
|
||||
// FIXME: remove this workaround
|
||||
// Uncomment this if you have the first generation (V1.10) of STBs board
|
||||
// pinMode(17, OUTPUT); // Enable LCD backlight
|
||||
// digitalWrite(17, HIGH);
|
||||
|
||||
#ifdef LCD_SCREEN_ROT_90
|
||||
u8g.setRot90(); // Rotate screen by 90°
|
||||
#elif defined(LCD_SCREEN_ROT_180)
|
||||
u8g.setRot180(); // Rotate screen by 180°
|
||||
#elif defined(LCD_SCREEN_ROT_270)
|
||||
u8g.setRot270(); // Rotate screen by 270°
|
||||
#endif
|
||||
// pinMode(17, OUTPUT); // Enable LCD backlight
|
||||
// digitalWrite(17, HIGH);
|
||||
|
||||
#ifdef LCD_SCREEN_ROT_90
|
||||
u8g.setRot90(); // Rotate screen by 90°
|
||||
#elif defined(LCD_SCREEN_ROT_180)
|
||||
u8g.setRot180(); // Rotate screen by 180°
|
||||
#elif defined(LCD_SCREEN_ROT_270)
|
||||
u8g.setRot270(); // Rotate screen by 270°
|
||||
#endif
|
||||
|
||||
// Show splashscreen
|
||||
int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
|
||||
@ -220,7 +220,7 @@ static void lcd_implementation_init()
|
||||
int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1)*DOG_CHAR_WIDTH) / 2;
|
||||
|
||||
u8g.firstPage();
|
||||
do {
|
||||
do {
|
||||
if (show_splashscreen) {
|
||||
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
|
||||
lcd_setFont(FONT_MENU);
|
||||
@ -232,7 +232,7 @@ static void lcd_implementation_init()
|
||||
u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
|
||||
#endif
|
||||
}
|
||||
} while (u8g.nextPage());
|
||||
} while (u8g.nextPage());
|
||||
show_splashscreen = false;
|
||||
}
|
||||
|
||||
@ -295,20 +295,19 @@ static void lcd_implementation_status_screen() {
|
||||
lcd_printPGM(PSTR("--:--"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Extruders
|
||||
for (int i=0; i<EXTRUDERS; i++) _draw_heater_status(6 + i * 25, i);
|
||||
|
||||
// Heatbed
|
||||
if (EXTRUDERS < 4) _draw_heater_status(81, -1);
|
||||
|
||||
|
||||
// Fan
|
||||
lcd_setFont(FONT_STATUSMENU);
|
||||
u8g.setPrintPos(104,27);
|
||||
#if HAS_FAN
|
||||
int per = ((fanSpeed + 1) * 100) / 256;
|
||||
if (per) {
|
||||
|
||||
lcd_print(itostr3(per));
|
||||
lcd_print('%');
|
||||
}
|
||||
|
Reference in New Issue
Block a user