Changes for graphics displays

Replaced displaying "---" instead of the value of a coordinate when
unhomed or with reduced precision
with blinking the coordinate-prefix-character ('X','Y','Z').
For "unhomed" a '?' is shown every second second - until that axis is
homed. The value displayed is, as before the "---" where displayed, the
relative to the reset position coordinate value.
When the axis stepper was disabled, now we can display a hint on that,
by showing a blinking ' ' instead of the axis letter, when
WARN_REDUCED_ACCURACY is defined.

I suppose the code itself is here the better documentation.

A '+/-' character is in non of our charsets so i decided for a '?' for
now to reduce the work.
There is no additional space on the displays one could use to display
the information, so replacing something is the only option. As the axis
letters are totally redundant with their positions on the display they
contain the least information.
So my decision was to overwrite them.
2.0.x
AnHardt 9 years ago
parent 32ae9f9ab7
commit 5b0f659355

@ -354,6 +354,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define DISABLE_X false #define DISABLE_X false
#define DISABLE_Y false #define DISABLE_Y false
#define DISABLE_Z false #define DISABLE_Z false
// Warn on display about possibly reduced accuracy
//#define WARN_REDUCED_ACCURACY
// @section extruder // @section extruder

@ -338,6 +338,9 @@ static void lcd_implementation_status_screen() {
} }
// X, Y, Z-Coordinates // 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 #define XYZ_BASELINE 38
lcd_setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
@ -348,32 +351,61 @@ static void lcd_implementation_status_screen() {
#endif #endif
u8g.setColorIndex(0); // white on black u8g.setColorIndex(0); // white on black
u8g.setPrintPos(2, XYZ_BASELINE); u8g.setPrintPos(2, XYZ_BASELINE);
lcd_print('X'); if (blink & 1)
lcd_printPGM(PSTR("X"));
else {
if (!axis_homed[X_AXIS])
lcd_printPGM(PSTR("?"));
else
#if ENABLED(WARN_REDUCED_ACCURACY)
if (!axis_known_position[X_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR("X"));
}
u8g.drawPixel(8, XYZ_BASELINE - 5); u8g.drawPixel(8, XYZ_BASELINE - 5);
u8g.drawPixel(8, XYZ_BASELINE - 3); u8g.drawPixel(8, XYZ_BASELINE - 3);
u8g.setPrintPos(10, XYZ_BASELINE); u8g.setPrintPos(10, XYZ_BASELINE);
if (axis_homed[X_AXIS] || (blink & 1))
lcd_print(ftostr31ns(current_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'); if (blink & 1)
lcd_printPGM(PSTR("Y"));
else {
if (!axis_homed[Y_AXIS])
lcd_printPGM(PSTR("?"));
else
#if ENABLED(WARN_REDUCED_ACCURACY)
if (!axis_known_position[Y_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR("Y"));
}
u8g.drawPixel(49, XYZ_BASELINE - 5); u8g.drawPixel(49, XYZ_BASELINE - 5);
u8g.drawPixel(49, XYZ_BASELINE - 3); u8g.drawPixel(49, XYZ_BASELINE - 3);
u8g.setPrintPos(51, XYZ_BASELINE); u8g.setPrintPos(51, XYZ_BASELINE);
if (axis_homed[Y_AXIS] || (blink & 1))
lcd_print(ftostr31ns(current_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'); if (blink & 1)
lcd_printPGM(PSTR("Z"));
else {
if (!axis_homed[Z_AXIS])
lcd_printPGM(PSTR("?"));
else
#if ENABLED(WARN_REDUCED_ACCURACY)
if (!axis_known_position[Z_AXIS])
lcd_printPGM(PSTR(" "));
else
#endif
lcd_printPGM(PSTR("Z"));
}
u8g.drawPixel(89, XYZ_BASELINE - 5); u8g.drawPixel(89, XYZ_BASELINE - 5);
u8g.drawPixel(89, XYZ_BASELINE - 3); u8g.drawPixel(89, XYZ_BASELINE - 3);
u8g.setPrintPos(91, XYZ_BASELINE); u8g.setPrintPos(91, XYZ_BASELINE);
if (axis_homed[Z_AXIS] || (blink & 1))
lcd_print(ftostr32sp(current_position[Z_AXIS])); lcd_print(ftostr32sp(current_position[Z_AXIS]));
else
lcd_printPGM(PSTR("---.--"));
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
// Feedrate // Feedrate

Loading…
Cancel
Save