XYZ unhomed

This commit is contained in:
Scott Lahteine 2016-05-17 17:02:53 -07:00
parent a9926b71a4
commit a28970784c
2 changed files with 18 additions and 8 deletions

View file

@ -2063,10 +2063,17 @@ static void setup_for_endstop_move() {
#endif // AUTO_BED_LEVELING_FEATURE #endif // AUTO_BED_LEVELING_FEATURE
#if ENABLED(Z_PROBE_SLED) || ENABLED(Z_SAFE_HOMING) || ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(Z_PROBE_SLED) || ENABLED(Z_SAFE_HOMING) || ENABLED(AUTO_BED_LEVELING_FEATURE)
static void axis_unhomed_error() { static void axis_unhomed_error(bool xyz=false) {
LCD_MESSAGEPGM(MSG_YX_UNHOMED); if (xyz) {
SERIAL_ECHO_START; LCD_MESSAGEPGM(MSG_XYZ_UNHOMED);
SERIAL_ECHOLNPGM(MSG_YX_UNHOMED); SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_XYZ_UNHOMED);
}
else {
LCD_MESSAGEPGM(MSG_YX_UNHOMED);
SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_YX_UNHOMED);
}
} }
#endif #endif
@ -2090,8 +2097,8 @@ static void setup_for_endstop_move() {
} }
#endif #endif
if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS]) { if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS] || !axis_homed[Z_AXIS]) {
axis_unhomed_error(); axis_unhomed_error(true);
return; return;
} }
@ -3177,7 +3184,7 @@ inline void gcode_G28() {
// Don't allow auto-leveling without homing first // Don't allow auto-leveling without homing first
if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS] || !axis_homed[Z_AXIS]) { if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS] || !axis_homed[Z_AXIS]) {
axis_unhomed_error(); axis_unhomed_error(true);
return; return;
} }
@ -4035,7 +4042,7 @@ inline void gcode_M42() {
inline void gcode_M48() { inline void gcode_M48() {
if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS] || !axis_homed[Z_AXIS]) { if (!axis_homed[X_AXIS] || !axis_homed[Y_AXIS] || !axis_homed[Z_AXIS]) {
axis_unhomed_error(); axis_unhomed_error(true);
return; return;
} }

View file

@ -448,6 +448,9 @@
#ifndef MSG_YX_UNHOMED #ifndef MSG_YX_UNHOMED
#define MSG_YX_UNHOMED "Home X/Y before Z" #define MSG_YX_UNHOMED "Home X/Y before Z"
#endif #endif
#ifndef MSG_XYZ_UNHOMED
#define MSG_XYZ_UNHOMED "Home XYZ first"
#endif
#ifndef MSG_ZPROBE_ZOFFSET #ifndef MSG_ZPROBE_ZOFFSET
#define MSG_ZPROBE_ZOFFSET "Z Offset" #define MSG_ZPROBE_ZOFFSET "Z Offset"
#endif #endif