Styling adjustments (PR#2668 & PR#2670)
Keep "astyled" reformatting
This commit is contained in:
committed by
Richard Wackerbarth
parent
b5fb7075b9
commit
0c7f7ebcfb
@ -36,7 +36,7 @@
|
||||
#include "Configuration.h"
|
||||
|
||||
#if DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_NON) && ENABLED(USE_BIG_EDIT_FONT)
|
||||
#undef USE_BIG_EDIT_FONT
|
||||
#undef USE_BIG_EDIT_FONT
|
||||
#endif
|
||||
|
||||
|
||||
@ -203,11 +203,11 @@ static void lcd_implementation_init() {
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_PIN_RESET)
|
||||
pinMode(LCD_PIN_RESET, OUTPUT);
|
||||
pinMode(LCD_PIN_RESET, OUTPUT);
|
||||
digitalWrite(LCD_PIN_RESET, HIGH);
|
||||
#endif
|
||||
#if DISABLED(MINIPANEL) // setContrast not working for Mini Panel
|
||||
u8g.setContrast(lcd_contrast);
|
||||
u8g.setContrast(lcd_contrast);
|
||||
#endif
|
||||
// FIXME: remove this workaround
|
||||
// Uncomment this if you have the first generation (V1.10) of STBs board
|
||||
@ -230,7 +230,7 @@ static void lcd_implementation_init() {
|
||||
int offy = DOG_CHAR_HEIGHT;
|
||||
#endif
|
||||
|
||||
int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1)*DOG_CHAR_WIDTH) / 2;
|
||||
int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1) * DOG_CHAR_WIDTH) / 2;
|
||||
|
||||
u8g.firstPage();
|
||||
do {
|
||||
@ -240,9 +240,9 @@ static void lcd_implementation_init() {
|
||||
#ifndef STRING_SPLASH_LINE2
|
||||
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
|
||||
#else
|
||||
int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
|
||||
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
|
||||
u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
|
||||
int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1) * DOG_CHAR_WIDTH) / 2;
|
||||
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT * 3 / 2, STRING_SPLASH_LINE1);
|
||||
u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT * 1 / 2, STRING_SPLASH_LINE2);
|
||||
#endif
|
||||
}
|
||||
} while (u8g.nextPage());
|
||||
@ -261,10 +261,10 @@ static void _draw_heater_status(int x, int heater) {
|
||||
int y = 17 + (isBed ? 1 : 0);
|
||||
|
||||
lcd_setFont(FONT_STATUSMENU);
|
||||
u8g.setPrintPos(x,7);
|
||||
u8g.setPrintPos(x, 7);
|
||||
lcd_print(itostr3(int((heater >= 0 ? degTargetHotend(heater) : degTargetBed()) + 0.5)));
|
||||
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
||||
u8g.setPrintPos(x,28);
|
||||
u8g.setPrintPos(x, 28);
|
||||
lcd_print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5));
|
||||
|
||||
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
|
||||
@ -273,7 +273,7 @@ static void _draw_heater_status(int x, int heater) {
|
||||
}
|
||||
else {
|
||||
u8g.setColorIndex(0); // white on black
|
||||
u8g.drawBox(x+7,y,2,2);
|
||||
u8g.drawBox(x + 7, y, 2, 2);
|
||||
u8g.setColorIndex(1); // black on white
|
||||
}
|
||||
}
|
||||
@ -283,7 +283,7 @@ static void lcd_implementation_status_screen() {
|
||||
|
||||
// Symbols menu graphics, animated fan
|
||||
u8g.drawBitmapP(9,1,STATUS_SCREENBYTEWIDTH,STATUS_SCREENHEIGHT, (blink % 2) && fanSpeed ? status_screen0_bmp : status_screen1_bmp);
|
||||
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
// SD Card Symbol
|
||||
u8g.drawBox(42, 42 - TALL_FONT_CORRECTION, 8, 7);
|
||||
@ -296,7 +296,7 @@ static void lcd_implementation_status_screen() {
|
||||
|
||||
// SD Card Progress bar and clock
|
||||
lcd_setFont(FONT_STATUSMENU);
|
||||
|
||||
|
||||
if (IS_SD_PRINTING) {
|
||||
// Progress bar solid part
|
||||
u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2 - TALL_FONT_CORRECTION);
|
||||
@ -315,14 +315,14 @@ static void lcd_implementation_status_screen() {
|
||||
#endif
|
||||
|
||||
// Extruders
|
||||
for (int i=0; i<EXTRUDERS; i++) _draw_heater_status(6 + i * 25, i);
|
||||
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);
|
||||
u8g.setPrintPos(104, 27);
|
||||
#if HAS_FAN
|
||||
int per = ((fanSpeed + 1) * 100) / 256;
|
||||
if (per) {
|
||||
@ -340,55 +340,55 @@ static void lcd_implementation_status_screen() {
|
||||
lcd_setFont(FONT_STATUSMENU);
|
||||
|
||||
#if ENABLED(USE_SMALL_INFOFONT)
|
||||
u8g.drawBox(0,30,LCD_PIXEL_WIDTH,10);
|
||||
u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 10);
|
||||
#else
|
||||
u8g.drawBox(0,30,LCD_PIXEL_WIDTH,9);
|
||||
u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 9);
|
||||
#endif
|
||||
u8g.setColorIndex(0); // white on black
|
||||
u8g.setPrintPos(2,XYZ_BASELINE);
|
||||
u8g.setPrintPos(2, XYZ_BASELINE);
|
||||
lcd_print('X');
|
||||
u8g.drawPixel(8,XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(8,XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(10,XYZ_BASELINE);
|
||||
u8g.drawPixel(8, XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(8, XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(10, XYZ_BASELINE);
|
||||
if (axis_known_position[X_AXIS])
|
||||
lcd_print(ftostr31ns(current_position[X_AXIS]));
|
||||
else
|
||||
lcd_printPGM(PSTR("---"));
|
||||
u8g.setPrintPos(43,XYZ_BASELINE);
|
||||
u8g.setPrintPos(43, XYZ_BASELINE);
|
||||
lcd_print('Y');
|
||||
u8g.drawPixel(49,XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(49,XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(51,XYZ_BASELINE);
|
||||
u8g.drawPixel(49, XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(49, XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(51, XYZ_BASELINE);
|
||||
if (axis_known_position[Y_AXIS])
|
||||
lcd_print(ftostr31ns(current_position[Y_AXIS]));
|
||||
else
|
||||
lcd_printPGM(PSTR("---"));
|
||||
u8g.setPrintPos(83,XYZ_BASELINE);
|
||||
u8g.setPrintPos(83, XYZ_BASELINE);
|
||||
lcd_print('Z');
|
||||
u8g.drawPixel(89,XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(89,XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(91,XYZ_BASELINE);
|
||||
u8g.drawPixel(89, XYZ_BASELINE - 5);
|
||||
u8g.drawPixel(89, XYZ_BASELINE - 3);
|
||||
u8g.setPrintPos(91, XYZ_BASELINE);
|
||||
if (axis_known_position[Z_AXIS])
|
||||
lcd_print(ftostr32sp(current_position[Z_AXIS]));
|
||||
else
|
||||
lcd_printPGM(PSTR("---.--"));
|
||||
u8g.setColorIndex(1); // black on white
|
||||
|
||||
|
||||
// Feedrate
|
||||
lcd_setFont(FONT_MENU);
|
||||
u8g.setPrintPos(3,49);
|
||||
u8g.setPrintPos(3, 49);
|
||||
lcd_print(LCD_STR_FEEDRATE[0]);
|
||||
lcd_setFont(FONT_STATUSMENU);
|
||||
u8g.setPrintPos(12,49);
|
||||
u8g.setPrintPos(12, 49);
|
||||
lcd_print(itostr3(feedrate_multiplier));
|
||||
lcd_print('%');
|
||||
|
||||
// Status line
|
||||
lcd_setFont(FONT_STATUSMENU);
|
||||
#if ENABLED(USE_SMALL_INFOFONT)
|
||||
u8g.setPrintPos(0,62);
|
||||
u8g.setPrintPos(0, 62);
|
||||
#else
|
||||
u8g.setPrintPos(0,63);
|
||||
u8g.setPrintPos(0, 63);
|
||||
#endif
|
||||
#if DISABLED(FILAMENT_LCD_DISPLAY)
|
||||
lcd_print(lcd_status_message);
|
||||
@ -429,7 +429,7 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co
|
||||
pstr++;
|
||||
}
|
||||
while (n--) lcd_print(' ');
|
||||
u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
||||
u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
|
||||
lcd_print(post_char);
|
||||
lcd_print(' ');
|
||||
}
|
||||
@ -448,7 +448,7 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c
|
||||
lcd_print(':');
|
||||
while (n--) lcd_print(' ');
|
||||
u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH * vallen, (row + 1) * DOG_CHAR_HEIGHT);
|
||||
if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
|
||||
if (pgm) lcd_printPGM(data); else lcd_print((char*)data);
|
||||
}
|
||||
|
||||
#define lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, false)
|
||||
@ -506,7 +506,7 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir) {
|
||||
static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) {
|
||||
char c;
|
||||
uint8_t n = LCD_WIDTH - 1;
|
||||
|
||||
|
Reference in New Issue
Block a user