|
|
@ -34,9 +34,28 @@
|
|
|
|
#define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
|
|
|
|
#define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
|
|
|
|
#define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
|
|
|
|
#define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
|
|
|
|
#define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
|
|
|
|
#define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
|
|
|
|
#define X_CENTER float((X_MIN_POS + X_MAX_POS) * 0.5)
|
|
|
|
|
|
|
|
#define Y_CENTER float((Y_MIN_POS + Y_MAX_POS) * 0.5)
|
|
|
|
// Defined only if the sanity-check is bypassed
|
|
|
|
#define Z_CENTER float((Z_MIN_POS + Z_MAX_POS) * 0.5)
|
|
|
|
#ifndef X_BED_SIZE
|
|
|
|
|
|
|
|
#define X_BED_SIZE X_MAX_LENGTH
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef Y_BED_SIZE
|
|
|
|
|
|
|
|
#define Y_BED_SIZE Y_MAX_LENGTH
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BED_CENTER_AT_0_0)
|
|
|
|
|
|
|
|
#define X_CENTER 0
|
|
|
|
|
|
|
|
#define Y_CENTER 0
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define X_CENTER ((X_BED_SIZE) / 2)
|
|
|
|
|
|
|
|
#define Y_CENTER ((Y_BED_SIZE) / 2)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
|
|
|
|
|
|
|
|
#define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
|
|
|
|
|
|
|
|
#define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
|
|
|
|
|
|
|
|
#define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2)
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* CoreXY, CoreXZ, and CoreYZ - and their reverse
|
|
|
|
* CoreXY, CoreXZ, and CoreYZ - and their reverse
|
|
|
@ -87,11 +106,11 @@
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#define X_HOME_POS 0
|
|
|
|
#define X_HOME_POS 0
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#define X_HOME_POS ((X_MAX_LENGTH) * (X_HOME_DIR) * 0.5)
|
|
|
|
#define X_HOME_POS ((X_BED_SIZE) * (X_HOME_DIR) * 0.5)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#define X_HOME_POS (X_MIN_POS + (X_MAX_LENGTH) * 0.5)
|
|
|
|
#define X_HOME_POS (X_MIN_POS + (X_BED_SIZE) * 0.5)
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
|
|
|
|
#define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -103,11 +122,11 @@
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#define Y_HOME_POS 0
|
|
|
|
#define Y_HOME_POS 0
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#define Y_HOME_POS ((Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5)
|
|
|
|
#define Y_HOME_POS ((Y_BED_SIZE) * (Y_HOME_DIR) * 0.5)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#define Y_HOME_POS (Y_MIN_POS + (Y_MAX_LENGTH) * 0.5)
|
|
|
|
#define Y_HOME_POS (Y_MIN_POS + (Y_BED_SIZE) * 0.5)
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
|
|
|
|
#define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -151,10 +170,10 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#if ENABLED(Z_SAFE_HOMING)
|
|
|
|
#if ENABLED(Z_SAFE_HOMING)
|
|
|
|
#ifndef Z_SAFE_HOMING_X_POINT
|
|
|
|
#ifndef Z_SAFE_HOMING_X_POINT
|
|
|
|
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)
|
|
|
|
#define Z_SAFE_HOMING_X_POINT X_CENTER
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifndef Z_SAFE_HOMING_Y_POINT
|
|
|
|
#ifndef Z_SAFE_HOMING_Y_POINT
|
|
|
|
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)
|
|
|
|
#define Z_SAFE_HOMING_Y_POINT Y_CENTER
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT
|
|
|
|
#define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT
|
|
|
|
#define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT
|
|
|
|
#define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT
|
|
|
@ -792,25 +811,40 @@
|
|
|
|
#define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
|
|
|
|
#define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Bed Probing rectangular bounds
|
|
|
|
|
|
|
|
* These can be further constrained in code for Delta and SCARA
|
|
|
|
|
|
|
|
*/
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
// These will be further constrained in code, but UBL_PROBE_PT values
|
|
|
|
#ifndef DELTA_PROBEABLE_RADIUS
|
|
|
|
// cannot be compile-time verified within the radius.
|
|
|
|
#define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
|
|
|
|
#define MIN_PROBE_X (-DELTA_PRINTABLE_RADIUS)
|
|
|
|
#endif
|
|
|
|
#define MAX_PROBE_X ( DELTA_PRINTABLE_RADIUS)
|
|
|
|
// Probing points may be verified at compile time within the radius
|
|
|
|
#define MIN_PROBE_Y (-DELTA_PRINTABLE_RADIUS)
|
|
|
|
// using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
|
|
|
|
#define MAX_PROBE_Y ( DELTA_PRINTABLE_RADIUS)
|
|
|
|
// so that may be added to SanityCheck.h in the future.
|
|
|
|
|
|
|
|
#define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS))
|
|
|
|
|
|
|
|
#define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS))
|
|
|
|
|
|
|
|
#define MAX_PROBE_X (X_CENTER + DELTA_PROBEABLE_RADIUS)
|
|
|
|
|
|
|
|
#define MAX_PROBE_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS)
|
|
|
|
#elif IS_SCARA
|
|
|
|
#elif IS_SCARA
|
|
|
|
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
|
|
|
|
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
|
|
|
|
#define MIN_PROBE_X (-SCARA_PRINTABLE_RADIUS)
|
|
|
|
#define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS))
|
|
|
|
#define MAX_PROBE_X ( SCARA_PRINTABLE_RADIUS)
|
|
|
|
#define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS))
|
|
|
|
#define MIN_PROBE_Y (-SCARA_PRINTABLE_RADIUS)
|
|
|
|
#define MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS)
|
|
|
|
#define MAX_PROBE_Y ( SCARA_PRINTABLE_RADIUS)
|
|
|
|
#define MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS)
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
// Boundaries for probing based on set limits
|
|
|
|
// Boundaries for Cartesian probing based on set limits
|
|
|
|
#define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
|
|
|
|
#if ENABLED(BED_CENTER_AT_0_0)
|
|
|
|
#define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
|
|
|
|
#define MIN_PROBE_X (max(X_PROBE_OFFSET_FROM_EXTRUDER, 0) - (X_BED_SIZE) / 2)
|
|
|
|
#define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
|
|
|
#define MIN_PROBE_Y (max(Y_PROBE_OFFSET_FROM_EXTRUDER, 0) - (Y_BED_SIZE) / 2)
|
|
|
|
#define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
|
|
|
#define MAX_PROBE_X (min(X_BED_SIZE + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE) - (X_BED_SIZE) / 2)
|
|
|
|
|
|
|
|
#define MAX_PROBE_Y (min(Y_BED_SIZE + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE) - (Y_BED_SIZE) / 2)
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define MIN_PROBE_X (max(X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER, 0))
|
|
|
|
|
|
|
|
#define MIN_PROBE_Y (max(Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, 0))
|
|
|
|
|
|
|
|
#define MAX_PROBE_X (min(X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE))
|
|
|
|
|
|
|
|
#define MAX_PROBE_Y (min(Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE))
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Stepper pulse duration, in cycles
|
|
|
|
// Stepper pulse duration, in cycles
|
|
|
@ -835,7 +869,7 @@
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* DELTA_SEGMENT_MIN_LENGTH and DELTA_PROBEABLE_RADIUS for UBL_DELTA
|
|
|
|
* DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#if UBL_DELTA
|
|
|
|
#if UBL_DELTA
|
|
|
|
#ifndef DELTA_SEGMENT_MIN_LENGTH
|
|
|
|
#ifndef DELTA_SEGMENT_MIN_LENGTH
|
|
|
@ -847,9 +881,6 @@
|
|
|
|
#define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
|
|
|
|
#define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifndef DELTA_PROBEABLE_RADIUS
|
|
|
|
|
|
|
|
#define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Shorthand
|
|
|
|
// Shorthand
|
|
|
|