Merge pull request #3560 from thinkyhead/rc_better_graphical_lcd

Aesthetic, functional improvements for Graphical Display
master
Scott Lahteine 9 years ago
commit 00d36d10e2

@ -218,7 +218,7 @@
#endif #endif
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
/* Custom characters defined in font font_6x10_marlin_symbols */ /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
// \x00 intentionally skipped to avoid problems in strings // \x00 intentionally skipped to avoid problems in strings
#define LCD_STR_REFRESH "\x01" #define LCD_STR_REFRESH "\x01"
#define LCD_STR_FOLDER "\x02" #define LCD_STR_FOLDER "\x02"
@ -235,7 +235,7 @@
// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here. // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
#else #else
/* Custom characters defined in the first 8 characters of the LCD */ /* Custom characters defined in the first 8 characters of the LCD */
#define LCD_STR_BEDTEMP "\x00" // this will have 'unexpected' results when used in a string! #define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string!
#define LCD_STR_DEGREE "\x01" #define LCD_STR_DEGREE "\x01"
#define LCD_STR_THERMOMETER "\x02" #define LCD_STR_THERMOMETER "\x02"
#define LCD_STR_UPLEVEL "\x03" #define LCD_STR_UPLEVEL "\x03"

@ -279,26 +279,51 @@ static void lcd_implementation_init() {
static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
static void _draw_heater_status(int x, int heater) { FORCE_INLINE void _draw_centered_temp(int temp, int x, int y) {
int degsize = 6 * (temp >= 100 ? 3 : temp >= 10 ? 2 : 1); // number's pixel width
u8g.setPrintPos(x - (18 - degsize) / 2, y); // move left if shorter
lcd_print(itostr3(temp));
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
}
FORCE_INLINE void _draw_heater_status(int x, int heater) {
#if HAS_TEMP_BED
bool isBed = heater < 0; bool isBed = heater < 0;
int y = 17 + (isBed ? 1 : 0); #else
const bool isBed = false;
#endif
lcd_setFont(FONT_STATUSMENU); _draw_centered_temp((isBed ? degTargetBed() : degTargetHotend(heater)) + 0.5, 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);
lcd_print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5));
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); _draw_centered_temp((isBed ? degBed() : degHotend(heater)) + 0.5, x, 28);
if (heater >= 0 ? !isHeatingHotend(heater) : !isHeatingBed()) {
u8g.drawBox(x+7,y,2,2); int h = isBed ? 7 : 8,
} y = isBed ? 18 : 17;
else { if (isBed ? isHeatingBed() : isHeatingHotend(heater)) {
u8g.setColorIndex(0); // white on black u8g.setColorIndex(0); // white on black
u8g.drawBox(x + 7, y, 2, 2); u8g.drawBox(x + h, y, 2, 2);
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
} }
else {
u8g.drawBox(x + h, y, 2, 2);
}
}
FORCE_INLINE void _draw_axis_label(AxisEnum axis, const char *pstr, bool blink) {
if (blink)
lcd_printPGM(pstr);
else {
if (!axis_homed[axis])
lcd_printPGM(PSTR("?"));
else {
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[axis])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(pstr);
}
}
} }
static void lcd_implementation_status_screen() { static void lcd_implementation_status_screen() {
@ -315,6 +340,9 @@ static void lcd_implementation_status_screen() {
#endif #endif
); );
// Status Menu Font for SD info, Heater status, Fan, XYZ
lcd_setFont(FONT_STATUSMENU);
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
// SD Card Symbol // SD Card Symbol
u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7); u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7);
@ -326,8 +354,6 @@ static void lcd_implementation_status_screen() {
u8g.drawFrame(54, 49, 73, 4 - (TALL_FONT_CORRECTION)); u8g.drawFrame(54, 49, 73, 4 - (TALL_FONT_CORRECTION));
// SD Card Progress bar and clock // SD Card Progress bar and clock
lcd_setFont(FONT_STATUSMENU);
if (IS_SD_PRINTING) { if (IS_SD_PRINTING) {
// Progress bar solid part // Progress bar solid part
u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2 - (TALL_FONT_CORRECTION)); u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2 - (TALL_FONT_CORRECTION));
@ -340,19 +366,17 @@ static void lcd_implementation_status_screen() {
lcd_print(':'); lcd_print(':');
lcd_print(itostr2(time%60)); lcd_print(itostr2(time%60));
} }
else {
lcd_printPGM(PSTR("--:--"));
}
#endif #endif
// Extruders // 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(5 + i * 25, i);
// Heatbed // Heated bed
if (EXTRUDERS < 4) _draw_heater_status(81, -1); #if EXTRUDERS < 4 && HAS_TEMP_BED
_draw_heater_status(81, -1);
#endif
// Fan // Fan
lcd_setFont(FONT_STATUSMENU);
u8g.setPrintPos(104, 27); u8g.setPrintPos(104, 27);
#if HAS_FAN0 #if HAS_FAN0
int per = ((fanSpeeds[0] + 1) * 100) / 256; int per = ((fanSpeeds[0] + 1) * 100) / 256;
@ -360,18 +384,13 @@ static void lcd_implementation_status_screen() {
lcd_print(itostr3(per)); lcd_print(itostr3(per));
lcd_print('%'); lcd_print('%');
} }
else
#endif #endif
{
lcd_printPGM(PSTR("---"));
}
// X, Y, Z-Coordinates // X, Y, Z-Coordinates
// Before homing the axis letters are blinking 'X' <-> '?'. // Before homing the axis letters are blinking 'X' <-> '?'.
// When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '. // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '.
// When everything is ok you see a constant 'X'. // When everything is ok you see a constant 'X'.
#define XYZ_BASELINE 38 #define XYZ_BASELINE 38
lcd_setFont(FONT_STATUSMENU);
#if ENABLED(USE_SMALL_INFOFONT) #if ENABLED(USE_SMALL_INFOFONT)
u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 10); u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 10);
@ -379,78 +398,35 @@ static void lcd_implementation_status_screen() {
u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 9); u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 9);
#endif #endif
u8g.setColorIndex(0); // white on black u8g.setColorIndex(0); // white on black
u8g.setPrintPos(2, XYZ_BASELINE); u8g.setPrintPos(2, XYZ_BASELINE);
if (blink) _draw_axis_label(X_AXIS, PSTR(MSG_X), blink);
lcd_printPGM(PSTR(MSG_X));
else {
if (!axis_homed[X_AXIS])
lcd_printPGM(PSTR("?"));
else {
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[X_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR(MSG_X));
}
}
u8g.drawPixel(8, XYZ_BASELINE - 5);
u8g.drawPixel(8, XYZ_BASELINE - 3);
u8g.setPrintPos(10, XYZ_BASELINE); u8g.setPrintPos(10, XYZ_BASELINE);
lcd_print(ftostr31ns(current_position[X_AXIS])); lcd_print(ftostr4sign(current_position[X_AXIS]));
u8g.setPrintPos(43, XYZ_BASELINE); u8g.setPrintPos(43, XYZ_BASELINE);
if (blink) _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
lcd_printPGM(PSTR(MSG_Y));
else {
if (!axis_homed[Y_AXIS])
lcd_printPGM(PSTR("?"));
else {
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[Y_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR(MSG_Y));
}
}
u8g.drawPixel(49, XYZ_BASELINE - 5);
u8g.drawPixel(49, XYZ_BASELINE - 3);
u8g.setPrintPos(51, XYZ_BASELINE); u8g.setPrintPos(51, XYZ_BASELINE);
lcd_print(ftostr31ns(current_position[Y_AXIS])); lcd_print(ftostr4sign(current_position[Y_AXIS]));
u8g.setPrintPos(83, XYZ_BASELINE); u8g.setPrintPos(83, XYZ_BASELINE);
if (blink) _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
lcd_printPGM(PSTR(MSG_Z));
else {
if (!axis_homed[Z_AXIS])
lcd_printPGM(PSTR("?"));
else {
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[Z_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR(MSG_Z));
}
}
u8g.drawPixel(89, XYZ_BASELINE - 5);
u8g.drawPixel(89, XYZ_BASELINE - 3);
u8g.setPrintPos(91, XYZ_BASELINE); u8g.setPrintPos(91, XYZ_BASELINE);
lcd_print(ftostr32sp(current_position[Z_AXIS])); lcd_print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
// Feedrate // Feedrate
lcd_setFont(FONT_MENU); lcd_setFont(FONT_MENU);
u8g.setPrintPos(3, 49); u8g.setPrintPos(3, 49);
lcd_print(LCD_STR_FEEDRATE[0]); lcd_print(LCD_STR_FEEDRATE[0]);
lcd_setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
u8g.setPrintPos(12, 49); u8g.setPrintPos(12, 49);
lcd_print(itostr3(feedrate_multiplier)); lcd_print(itostr3(feedrate_multiplier));
lcd_print('%'); lcd_print('%');
// Status line // Status line
lcd_setFont(FONT_STATUSMENU);
#if ENABLED(USE_SMALL_INFOFONT) #if ENABLED(USE_SMALL_INFOFONT)
u8g.setPrintPos(0, 62); u8g.setPrintPos(0, 62);
#else #else

@ -1,23 +0,0 @@
The fonts are created with Fony.exe (http://hukka.ncn.fi/?fony) because Fontforge didn't do what I want (probably lack of experience).
In Fony export the fonts to bdf-format. Maybe another one can edit them with Fontforge.
Then run make_fonts.bat what calls bdf2u8g.exe with the needed parameters to produce the .h files.
The .h files must be edited to replace '#include "u8g.h"' with '#include <utility/u8g.h>', replace 'U8G_FONT_SECTION' with 'U8G_SECTION', insert '.progmem.' right behind the first '"' and moved to the main directory.
How to integrate a new font:
Currently we are limited to 256 symbols per font. We use a menu system with 5 lines, on a display with 64 pixel height. That means we have 12 pixel for a line. To have some space in between the lines we can't use more than 10 pixel height for the symbols. For up to 11 pixel set TALL_FONT_CORRECTION 1 when loading the font.
To fit 22 Symbols on the 128 pixel wide screen, the symbols can't be wider than 5 pixel, for the first 128 symbols.
For the second half of the font we now support up to 11x11 pixel.
* Get 'Fony.exe'
* Copy one of the existing *.fon files and work with this.
* Change the pixels. Don't change width or height.
* Export as *.bdf
* Use 'bdf2u8g.exe' to produce the *.h file. Examples for the existing fonts are in 'make_fonts.bat'
* Edit the produced .h file to match our needs. See hints in 'README.fonts' or the other 'dogm_font_data_.h' files.
* Make a new entry in the font list in 'dogm_lcd_implementation.h' before the '#else // fall back'
#elif ENABLED(DISPLAY_CHARSET_NEWNAME)
#include "dogm_font_data_yourfont.h"
#define FONT_MENU_NAME YOURFONTNAME
#else // fall-back
* Add your font to the list of permitted fonts in 'language_en.h'
... || ENABLED(DISPLAY_CHARSET_YOUR_NEW_FONT) ... )

@ -0,0 +1,30 @@
The fonts are created with Fony.exe (http://hukka.ncn.fi/?fony) because Fontforge didn't do what I want (probably lack of experience).
In Fony export the fonts to bdf-format. (Maybe another one can edit them with Fontforge.) Then run `make_fonts.bat` which calls `bdf2u8g.exe` with the parameters needed to produce the `.h` files. The `.h` files must be edited and moved:
- Replace `#include "u8g.h"` with `#include <utility/u8g.h>`,
- Replace `U8G_FONT_SECTION` with `U8G_SECTION`,
- Insert `.progmem.` right after the first quote `"`,
- Move the file to the main directory.
How to integrate a new font:
Currently we are limited to 256 symbols per font. We use a menu system with 5 lines, on a display with 64 pixel height. That means we have 12 pixels per line. So to have any space between the lines we can use no more than 10 pixel height for the symbols. For up to 11 pixels set TALL_FONT_CORRECTION 1 when loading the font.
To fit 22 Symbols on the 128 pixel wide screen, the symbols can't be wider than 5 pixel, for the first 128 symbols.
For the second half of the font we now support up to 11x11 pixel.
- Get `Fony.exe` from [hukka.ncn.fi](http://hukka.ncn.fi/?fony)
- Copy one of the existing `*.fon` files and use the copy for your work.
- Only change the pixels. Don't change width or height.
- Export as a `*.bdf` file
- Use `bdf2u8g.exe` to produce the `.h` file. Examples for the existing fonts are in `make_fonts.bat`.
- Edit the produced `.h` file to match our needs. Find hints in the `dogm_font_data_.h` files.
- Make a new entry in the font list in `dogm_lcd_implementation.h` before the `#else // fall-back` line:
```cpp
#elif ENABLED(DISPLAY_CHARSET_NEWNAME)
#include "dogm_font_data_yourfont.h"
#define FONT_MENU_NAME YOURFONTNAME
#else // fall-back
```
- Add your font to the list of permitted fonts in 'language_en.h'
```cpp
... || ENABLED(DISPLAY_CHARSET_YOUR_NEW_FONT) ... )
```

@ -93,10 +93,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ves-jerk" #define MSG_VE_JERK "Ves-jerk"
#define MSG_VMAX "Vmax" #define MSG_VMAX "Vmax"
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "y" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax" #define MSG_AMAX "Amax"

@ -94,10 +94,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -94,10 +94,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -92,10 +92,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -99,10 +99,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -95,10 +95,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -95,10 +95,10 @@
#define MSG_VZ_JERK "V z Ruck" #define MSG_VZ_JERK "V z Ruck"
#define MSG_VE_JERK "V e Ruck" #define MSG_VE_JERK "V e Ruck"
#define MSG_VMAX "V max " // space by purpose #define MSG_VMAX "V max " // space by purpose
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "V min" #define MSG_VMIN "V min"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "A max " // space by purpose #define MSG_AMAX "A max " // space by purpose

@ -272,16 +272,16 @@
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#endif #endif
#ifndef MSG_X #ifndef MSG_X
#define MSG_X "x" #define MSG_X "X"
#endif #endif
#ifndef MSG_Y #ifndef MSG_Y
#define MSG_Y "y" #define MSG_Y "Y"
#endif #endif
#ifndef MSG_Z #ifndef MSG_Z
#define MSG_Z "z" #define MSG_Z "Z"
#endif #endif
#ifndef MSG_E #ifndef MSG_E
#define MSG_E "e" #define MSG_E "E"
#endif #endif
#ifndef MSG_VMIN #ifndef MSG_VMIN
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"

@ -94,10 +94,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax" #define MSG_VMAX "Vmax"
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "Vel. viaje min" #define MSG_VTRAV_MIN "Vel. viaje min"
#define MSG_AMAX "Acel. max" #define MSG_AMAX "Acel. max"

@ -93,10 +93,10 @@
#define MSG_VZ_JERK "Vz-astindua" #define MSG_VZ_JERK "Vz-astindua"
#define MSG_VE_JERK "Ve-astindua" #define MSG_VE_JERK "Ve-astindua"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -93,10 +93,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VLiike min" #define MSG_VTRAV_MIN "VLiike min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -95,10 +95,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax" #define MSG_VMAX "Vmax"
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "Vdepl min" #define MSG_VTRAV_MIN "Vdepl min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -92,10 +92,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -94,10 +94,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -93,10 +93,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -93,10 +93,10 @@
#define MSG_VZ_JERK "Zryw Vz" #define MSG_VZ_JERK "Zryw Vz"
#define MSG_VE_JERK "Zryw Ve" #define MSG_VE_JERK "Zryw Ve"
#define MSG_VMAX "Vmax" #define MSG_VMAX "Vmax"
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "Vskok min" #define MSG_VTRAV_MIN "Vskok min"
#define MSG_AMAX "Amax" #define MSG_AMAX "Amax"

@ -93,10 +93,10 @@
#define MSG_VZ_JERK "jogo VZ" #define MSG_VZ_JERK "jogo VZ"
#define MSG_VE_JERK "jogo VE" #define MSG_VE_JERK "jogo VE"
#define MSG_VMAX " Vmax " #define MSG_VMAX " Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -93,10 +93,10 @@
#define MSG_VZ_JERK "jogo VZ" #define MSG_VZ_JERK "jogo VZ"
#define MSG_VE_JERK "jogo VE" #define MSG_VE_JERK "jogo VE"
#define MSG_VMAX " Vmax " #define MSG_VMAX " Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -98,10 +98,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX " Vmax " #define MSG_VMAX " Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -98,10 +98,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX " Vmax " #define MSG_VMAX " Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "

@ -94,10 +94,10 @@
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#define MSG_X "x" #define MSG_X "X"
#define MSG_Y "y" #define MSG_Y "Y"
#define MSG_Z "z" #define MSG_Z "Z"
#define MSG_E "e" #define MSG_E "E"
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax" #define MSG_AMAX "Amax"

@ -569,6 +569,23 @@ unsigned lcd_print(char c) { return charset_mapper(c); }
#endif // SHOW_BOOTSCREEN #endif // SHOW_BOOTSCREEN
FORCE_INLINE void _draw_axis_label(AxisEnum axis, const char *pstr, bool blink) {
if (blink)
lcd_printPGM(pstr);
else {
if (!axis_homed[axis])
lcd_printPGM(PSTR("?"));
else {
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[axis])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(pstr);
}
}
}
/** /**
Possible status screens: Possible status screens:
16x2 |000/000 B000/000| 16x2 |000/000 B000/000|
@ -692,36 +709,12 @@ static void lcd_implementation_status_screen() {
// When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '. // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '.
// When everything is ok you see a constant 'X'. // When everything is ok you see a constant 'X'.
if (blink) _draw_axis_label(X_AXIS, PSTR(MSG_X), blink);
lcd_printPGM(PSTR("X"));
else {
if (!axis_homed[X_AXIS])
lcd_printPGM(PSTR("?"));
else
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[X_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR("X"));
}
lcd.print(ftostr4sign(current_position[X_AXIS])); lcd.print(ftostr4sign(current_position[X_AXIS]));
lcd_printPGM(PSTR(" ")); lcd_printPGM(PSTR(" "));
if (blink)
lcd_printPGM(PSTR("Y")); _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
else {
if (!axis_homed[Y_AXIS])
lcd_printPGM(PSTR("?"));
else
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[Y_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR("Y"));
}
lcd.print(ftostr4sign(current_position[Y_AXIS])); lcd.print(ftostr4sign(current_position[Y_AXIS]));
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
@ -729,19 +722,7 @@ static void lcd_implementation_status_screen() {
#endif // LCD_WIDTH >= 20 #endif // LCD_WIDTH >= 20
lcd.setCursor(LCD_WIDTH - 8, 1); lcd.setCursor(LCD_WIDTH - 8, 1);
if (blink) _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
lcd_printPGM(PSTR("Z"));
else {
if (!axis_homed[Z_AXIS])
lcd_printPGM(PSTR("?"));
else
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
if (!axis_known_position[Z_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR("Z"));
}
lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001)); lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
#endif // LCD_HEIGHT > 2 #endif // LCD_HEIGHT > 2

Loading…
Cancel
Save