"nozzle_to_probe_offset" is obsolete

This commit is contained in:
Scott Lahteine 2019-11-13 02:53:11 -06:00
parent 602ca5dea6
commit 3f4636e916
3 changed files with 10 additions and 16 deletions

View file

@ -1367,6 +1367,9 @@
#define XY_PROBE_SPEED 4000 #define XY_PROBE_SPEED 4000
#endif #endif
#endif #endif
#ifndef NOZZLE_TO_PROBE_OFFSET
#define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 }
#endif
#else #else
#undef NOZZLE_TO_PROBE_OFFSET #undef NOZZLE_TO_PROBE_OFFSET
#endif #endif
@ -1477,18 +1480,14 @@
#define MIN_PROBE_EDGE_BACK MIN_PROBE_EDGE #define MIN_PROBE_EDGE_BACK MIN_PROBE_EDGE
#endif #endif
#ifndef NOZZLE_TO_PROBE_OFFSET
#define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 }
#endif
#if ENABLED(DELTA) #if ENABLED(DELTA)
/** /**
* Delta radius/rod trimmers/angle trimmers * Delta radius/rod trimmers/angle trimmers
*/ */
#define _PROBE_RADIUS (DELTA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE)) #define _PROBE_RADIUS (DELTA_PRINTABLE_RADIUS - (MIN_PROBE_EDGE))
#ifndef DELTA_CALIBRATION_RADIUS #ifndef DELTA_CALIBRATION_RADIUS
#ifdef NOZZLE_TO_PROBE_OFFSET #if HAS_BED_PROBE
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - _MAX(ABS(nozzle_to_probe_offset.x), ABS(nozzle_to_probe_offset.y), ABS(MIN_PROBE_EDGE))) #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - _MAX(ABS(probe_offset.x), ABS(probe_offset.y), ABS(MIN_PROBE_EDGE)))
#else #else
#define DELTA_CALIBRATION_RADIUS _PROBE_RADIUS #define DELTA_CALIBRATION_RADIUS _PROBE_RADIUS
#endif #endif
@ -1543,16 +1542,16 @@
#define _MESH_MAX_Y (Y_MAX_BED - (MESH_INSET)) #define _MESH_MAX_Y (Y_MAX_BED - (MESH_INSET))
#else #else
// Boundaries for Cartesian probing based on set limits // Boundaries for Cartesian probing based on set limits
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) #if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL, PROBE_MANUALLY)
#define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS)) // UBL is careful not to probe off the bed. It does not #define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS)) // UBL is careful not to probe off the bed. It does not
#define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS)) // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions #define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS)) // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions
#define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS)) #define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS))
#define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS)) #define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS))
#else #else
#define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS + nozzle_to_probe_offset.x)) #define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS + probe_offset.x))
#define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS + nozzle_to_probe_offset.y)) #define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS + probe_offset.y))
#define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS + nozzle_to_probe_offset.x)) #define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS + probe_offset.x))
#define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + nozzle_to_probe_offset.y)) #define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + probe_offset.y))
#endif #endif
#endif #endif

View file

@ -2344,9 +2344,6 @@ void MarlinSettings::reset() {
#endif #endif
#if HAS_BED_PROBE #if HAS_BED_PROBE
#ifndef NOZZLE_TO_PROBE_OFFSET
#define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 }
#endif
constexpr float dpo[XYZ] = NOZZLE_TO_PROBE_OFFSET; constexpr float dpo[XYZ] = NOZZLE_TO_PROBE_OFFSET;
static_assert(COUNT(dpo) == 3, "NOZZLE_TO_PROBE_OFFSET must contain offsets for X, Y, and Z."); static_assert(COUNT(dpo) == 3, "NOZZLE_TO_PROBE_OFFSET must contain offsets for X, Y, and Z.");
LOOP_XYZ(a) probe_offset[a] = dpo[a]; LOOP_XYZ(a) probe_offset[a] = dpo[a];

View file

@ -29,8 +29,6 @@
#if HAS_BED_PROBE #if HAS_BED_PROBE
constexpr xyz_pos_t nozzle_to_probe_offset = NOZZLE_TO_PROBE_OFFSET;
extern xyz_pos_t probe_offset; extern xyz_pos_t probe_offset;
bool set_probe_deployed(const bool deploy); bool set_probe_deployed(const bool deploy);