|
@@ -1851,10 +1851,10 @@ static void clean_up_after_endstop_or_probe_move() {
|
1851
|
1851
|
|
1852
|
1852
|
#if HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) || ENABLED(DELTA_AUTO_CALIBRATION)
|
1853
|
1853
|
|
1854
|
|
- bool axis_unhomed_error(const bool x, const bool y, const bool z) {
|
1855
|
|
- const bool xx = x && !axis_homed[X_AXIS],
|
1856
|
|
- yy = y && !axis_homed[Y_AXIS],
|
1857
|
|
- zz = z && !axis_homed[Z_AXIS];
|
|
1854
|
+ bool axis_unhomed_error(const bool x/*=true*/, const bool y/*=true*/, const bool z/*=true*/) {
|
|
1855
|
+ const bool xx = x && !axis_known_position[X_AXIS],
|
|
1856
|
+ yy = y && !axis_known_position[Y_AXIS],
|
|
1857
|
+ zz = z && !axis_known_position[Z_AXIS];
|
1858
|
1858
|
if (xx || yy || zz) {
|
1859
|
1859
|
SERIAL_ECHO_START;
|
1860
|
1860
|
SERIAL_ECHOPGM(MSG_HOME " ");
|
|
@@ -2169,15 +2169,13 @@ static void clean_up_after_endstop_or_probe_move() {
|
2169
|
2169
|
return true;
|
2170
|
2170
|
}
|
2171
|
2171
|
}
|
2172
|
|
- #elif ENABLED(Z_PROBE_SLED)
|
2173
|
|
- if (axis_unhomed_error(true, false, false)) {
|
2174
|
|
- SERIAL_ERROR_START;
|
2175
|
|
- SERIAL_ERRORLNPGM(MSG_STOP_UNHOMED);
|
2176
|
|
- stop();
|
2177
|
|
- return true;
|
2178
|
|
- }
|
2179
|
|
- #elif ENABLED(Z_PROBE_ALLEN_KEY)
|
2180
|
|
- if (axis_unhomed_error(true, true, true )) {
|
|
2172
|
+ #elif ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY)
|
|
2173
|
+ #if ENABLED(Z_PROBE_SLED)
|
|
2174
|
+ #define _AUE_ARGS true, false, false
|
|
2175
|
+ #else
|
|
2176
|
+ #define _AUE_ARGS
|
|
2177
|
+ #endif
|
|
2178
|
+ if (axis_unhomed_error(_AUE_ARGS)) {
|
2181
|
2179
|
SERIAL_ERROR_START;
|
2182
|
2180
|
SERIAL_ERRORLNPGM(MSG_STOP_UNHOMED);
|
2183
|
2181
|
stop();
|
|
@@ -3414,7 +3412,7 @@ inline void gcode_G4() {
|
3414
|
3412
|
*/
|
3415
|
3413
|
inline void gcode_G12() {
|
3416
|
3414
|
// Don't allow nozzle cleaning without homing first
|
3417
|
|
- if (axis_unhomed_error(true, true, true)) return;
|
|
3415
|
+ if (axis_unhomed_error()) return;
|
3418
|
3416
|
|
3419
|
3417
|
const uint8_t pattern = code_seen('P') ? code_value_ushort() : 0,
|
3420
|
3418
|
strokes = code_seen('S') ? code_value_ushort() : NOZZLE_CLEAN_STROKES,
|
|
@@ -3443,7 +3441,7 @@ inline void gcode_G4() {
|
3443
|
3441
|
*/
|
3444
|
3442
|
inline void gcode_G27() {
|
3445
|
3443
|
// Don't allow nozzle parking without homing first
|
3446
|
|
- if (axis_unhomed_error(true, true, true)) return;
|
|
3444
|
+ if (axis_unhomed_error()) return;
|
3447
|
3445
|
Nozzle::park(code_seen('P') ? code_value_ushort() : 0);
|
3448
|
3446
|
}
|
3449
|
3447
|
#endif // NOZZLE_PARK_FEATURE
|
|
@@ -4222,7 +4220,7 @@ void home_all_axes() { gcode_G28(); }
|
4222
|
4220
|
#endif
|
4223
|
4221
|
|
4224
|
4222
|
// Don't allow auto-leveling without homing first
|
4225
|
|
- if (axis_unhomed_error(true, true, true)) return;
|
|
4223
|
+ if (axis_unhomed_error()) return;
|
4226
|
4224
|
|
4227
|
4225
|
// Define local vars 'static' for manual probing, 'auto' otherwise
|
4228
|
4226
|
#if ENABLED(PROBE_MANUALLY)
|
|
@@ -6174,7 +6172,7 @@ inline void gcode_M42() {
|
6174
|
6172
|
*/
|
6175
|
6173
|
inline void gcode_M48() {
|
6176
|
6174
|
|
6177
|
|
- if (axis_unhomed_error(true, true, true)) return;
|
|
6175
|
+ if (axis_unhomed_error()) return;
|
6178
|
6176
|
|
6179
|
6177
|
const int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
|
6180
|
6178
|
if (!WITHIN(verbose_level, 0, 4)) {
|
|
@@ -9427,7 +9425,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
9427
|
9425
|
feedrate_mm_s = fr_mm_s > 0.0 ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
|
9428
|
9426
|
|
9429
|
9427
|
if (tmp_extruder != active_extruder) {
|
9430
|
|
- if (!no_move && axis_unhomed_error(true, true, true)) {
|
|
9428
|
+ if (!no_move && axis_unhomed_error()) {
|
9431
|
9429
|
SERIAL_ECHOLNPGM("No move on toolchange");
|
9432
|
9430
|
no_move = true;
|
9433
|
9431
|
}
|