Merge pull request #3560 from thinkyhead/rc_better_graphical_lcd

Aesthetic, functional improvements for Graphical Display
This commit is contained in:
Scott Lahteine 2016-04-18 21:38:02 -07:00
commit 00d36d10e2
26 changed files with 194 additions and 230 deletions

View file

@ -218,7 +218,7 @@
#endif
#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
#define LCD_STR_REFRESH "\x01"
#define LCD_STR_FOLDER "\x02"
@ -235,7 +235,7 @@
// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
#else
/* 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_THERMOMETER "\x02"
#define LCD_STR_UPLEVEL "\x03"

View file

@ -279,25 +279,50 @@ static void lcd_implementation_init() {
static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
static void _draw_heater_status(int x, int heater) {
bool isBed = heater < 0;
int y = 17 + (isBed ? 1 : 0);
lcd_setFont(FONT_STATUSMENU);
u8g.setPrintPos(x, 7);
lcd_print(itostr3(int((heater >= 0 ? degTargetHotend(heater) : degTargetBed()) + 0.5)));
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 " "));
u8g.setPrintPos(x, 28);
lcd_print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5));
}
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
if (heater >= 0 ? !isHeatingHotend(heater) : !isHeatingBed()) {
u8g.drawBox(x+7,y,2,2);
FORCE_INLINE void _draw_heater_status(int x, int heater) {
#if HAS_TEMP_BED
bool isBed = heater < 0;
#else
const bool isBed = false;
#endif
_draw_centered_temp((isBed ? degTargetBed() : degTargetHotend(heater)) + 0.5, x, 7);
_draw_centered_temp((isBed ? degBed() : degHotend(heater)) + 0.5, x, 28);
int h = isBed ? 7 : 8,
y = isBed ? 18 : 17;
if (isBed ? isHeatingBed() : isHeatingHotend(heater)) {
u8g.setColorIndex(0); // white on black
u8g.drawBox(x + h, y, 2, 2);
u8g.setColorIndex(1); // black on white
}
else {
u8g.setColorIndex(0); // white on black
u8g.drawBox(x + 7, y, 2, 2);
u8g.setColorIndex(1); // black on white
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);
}
}
}
@ -315,6 +340,9 @@ static void lcd_implementation_status_screen() {
#endif
);
// Status Menu Font for SD info, Heater status, Fan, XYZ
lcd_setFont(FONT_STATUSMENU);
#if ENABLED(SDSUPPORT)
// SD Card Symbol
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));
// 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));
@ -340,19 +366,17 @@ static void lcd_implementation_status_screen() {
lcd_print(':');
lcd_print(itostr2(time%60));
}
else {
lcd_printPGM(PSTR("--:--"));
}
#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(5 + i * 25, i);
// Heatbed
if (EXTRUDERS < 4) _draw_heater_status(81, -1);
// Heated bed
#if EXTRUDERS < 4 && HAS_TEMP_BED
_draw_heater_status(81, -1);
#endif
// Fan
lcd_setFont(FONT_STATUSMENU);
u8g.setPrintPos(104, 27);
#if HAS_FAN0
int per = ((fanSpeeds[0] + 1) * 100) / 256;
@ -360,18 +384,13 @@ static void lcd_implementation_status_screen() {
lcd_print(itostr3(per));
lcd_print('%');
}
else
#endif
{
lcd_printPGM(PSTR("---"));
}
// X, Y, Z-Coordinates
// 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 everything is ok you see a constant 'X'.
#define XYZ_BASELINE 38
lcd_setFont(FONT_STATUSMENU);
#if ENABLED(USE_SMALL_INFOFONT)
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);
#endif
u8g.setColorIndex(0); // white on black
u8g.setPrintPos(2, XYZ_BASELINE);
if (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);
_draw_axis_label(X_AXIS, PSTR(MSG_X), blink);
u8g.setPrintPos(10, XYZ_BASELINE);
lcd_print(ftostr31ns(current_position[X_AXIS]));
lcd_print(ftostr4sign(current_position[X_AXIS]));
u8g.setPrintPos(43, XYZ_BASELINE);
if (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);
_draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
u8g.setPrintPos(51, XYZ_BASELINE);
lcd_print(ftostr31ns(current_position[Y_AXIS]));
lcd_print(ftostr4sign(current_position[Y_AXIS]));
u8g.setPrintPos(83, XYZ_BASELINE);
if (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);
_draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
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
// Feedrate
lcd_setFont(FONT_MENU);
u8g.setPrintPos(3, 49);
lcd_print(LCD_STR_FEEDRATE[0]);
lcd_setFont(FONT_STATUSMENU);
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);
#else

View file

@ -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) ... )

30
Marlin/fonts/README.md Normal file
View file

@ -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) ... )
```

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -569,6 +569,23 @@ unsigned lcd_print(char c) { return charset_mapper(c); }
#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:
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 everything is ok you see a constant 'X'.
if (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"));
}
_draw_axis_label(X_AXIS, PSTR(MSG_X), blink);
lcd.print(ftostr4sign(current_position[X_AXIS]));
lcd_printPGM(PSTR(" "));
if (blink)
lcd_printPGM(PSTR("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("Y"));
}
_draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink);
lcd.print(ftostr4sign(current_position[Y_AXIS]));
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
@ -729,19 +722,7 @@ static void lcd_implementation_status_screen() {
#endif // LCD_WIDTH >= 20
lcd.setCursor(LCD_WIDTH - 8, 1);
if (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"));
}
_draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink);
lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001));
#endif // LCD_HEIGHT > 2