Patch probe offset name, defines

This commit is contained in:
Scott Lahteine
2019-09-24 23:34:07 -05:00
parent 4e8d9fe59b
commit 5288c399ce
4 changed files with 55 additions and 51 deletions

View File

@ -28,9 +28,9 @@
#if HAS_BED_PROBE
#include "../libs/buzzer.h"
#include "probe.h"
#include "../libs/buzzer.h"
#include "motion.h"
#include "temperature.h"
#include "endstops.h"
@ -86,43 +86,6 @@ float probe_offset[XYZ]; // Initialized by settings.load()
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../core/debug_out.h"
float probe_min_x() {
return _MAX(
#if ENABLED(DELTA) || IS_SCARA
PROBE_X_MIN, MESH_MIN_X
#else
(X_MIN_BED) + (MIN_PROBE_EDGE), (X_MIN_POS) + probe_offset[X_AXIS]
#endif
);
}
float probe_max_x() {
return _MIN(
#if ENABLED(DELTA) || IS_SCARA
PROBE_X_MAX, MESH_MAX_X
#else
(X_MAX_BED) - (MIN_PROBE_EDGE), (X_MAX_POS) + probe_offset[X_AXIS]
#endif
);
}
float probe_min_y() {
return _MAX(
#if ENABLED(DELTA) || IS_SCARA
PROBE_Y_MIN, MESH_MIN_Y
#else
(Y_MIN_BED) + (MIN_PROBE_EDGE), (Y_MIN_POS) + probe_offset[Y_AXIS]
#endif
);
}
float probe_max_y() {
return _MIN(
#if ENABLED(DELTA) || IS_SCARA
PROBE_Y_MAX, MESH_MAX_Y
#else
(Y_MAX_BED) - (MIN_PROBE_EDGE), (Y_MAX_POS) + probe_offset[Y_AXIS]
#endif
);
}
#if ENABLED(Z_PROBE_SLED)
#ifndef SLED_DOCKING_OFFSET

View File

@ -47,7 +47,42 @@
extern const char msg_wait_for_bed_heating[25];
#endif
float probe_min_x(), probe_max_x(), probe_min_y(), probe_max_y();
inline float probe_min_x() {
return _MAX(
#if ENABLED(DELTA) || IS_SCARA
PROBE_X_MIN, MESH_MIN_X
#else
(X_MIN_BED) + (MIN_PROBE_EDGE), (X_MIN_POS) + probe_offset[X_AXIS]
#endif
);
}
inline float probe_max_x() {
return _MIN(
#if ENABLED(DELTA) || IS_SCARA
PROBE_X_MAX, MESH_MAX_X
#else
(X_MAX_BED) - (MIN_PROBE_EDGE), (X_MAX_POS) + probe_offset[X_AXIS]
#endif
);
}
inline float probe_min_y() {
return _MAX(
#if ENABLED(DELTA) || IS_SCARA
PROBE_Y_MIN, MESH_MIN_Y
#else
(Y_MIN_BED) + (MIN_PROBE_EDGE), (Y_MIN_POS) + probe_offset[Y_AXIS]
#endif
);
}
inline float probe_max_y() {
return _MIN(
#if ENABLED(DELTA) || IS_SCARA
PROBE_Y_MAX, MESH_MAX_Y
#else
(Y_MAX_BED) - (MIN_PROBE_EDGE), (Y_MAX_POS) + probe_offset[Y_AXIS]
#endif
);
}
#else
@ -55,6 +90,11 @@
#define DEPLOY_PROBE()
#define STOW_PROBE()
inline float probe_min_x() { return 0; };
inline float probe_max_x() { return 0; };
inline float probe_min_y() { return 0; };
inline float probe_max_y() { return 0; };
#endif
#if HAS_Z_SERVO_PROBE