|
@@ -203,11 +203,17 @@
|
203
|
203
|
* Safe Homing Options
|
204
|
204
|
*/
|
205
|
205
|
#if ENABLED(Z_SAFE_HOMING)
|
|
206
|
+ #if ENABLED(AUTO_BED_LEVELING_UBL)
|
|
207
|
+ // Home close to center so grid points have z heights very close to 0
|
|
208
|
+ #define _SAFE_POINT(A) (((GRID_MAX_POINTS_##A) / 2) * (A##_BED_SIZE - 2 * (MESH_INSET)) / (GRID_MAX_POINTS_##A - 1) + MESH_INSET)
|
|
209
|
+ #else
|
|
210
|
+ #define _SAFE_POINT(A) A##_CENTER
|
|
211
|
+ #endif
|
206
|
212
|
#ifndef Z_SAFE_HOMING_X_POINT
|
207
|
|
- #define Z_SAFE_HOMING_X_POINT X_CENTER
|
|
213
|
+ #define Z_SAFE_HOMING_X_POINT _SAFE_POINT(X)
|
208
|
214
|
#endif
|
209
|
215
|
#ifndef Z_SAFE_HOMING_Y_POINT
|
210
|
|
- #define Z_SAFE_HOMING_Y_POINT Y_CENTER
|
|
216
|
+ #define Z_SAFE_HOMING_Y_POINT _SAFE_POINT(Y)
|
211
|
217
|
#endif
|
212
|
218
|
#define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT
|
213
|
219
|
#define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT
|