|
|
@ -195,7 +195,9 @@ void homeaxis(const AxisEnum axis);
|
|
|
|
// Macros
|
|
|
|
// Macros
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
// Workspace offsets
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Workspace offsets
|
|
|
|
|
|
|
|
*/
|
|
|
|
#if HAS_WORKSPACE_OFFSET
|
|
|
|
#if HAS_WORKSPACE_OFFSET
|
|
|
|
#if HAS_HOME_OFFSET
|
|
|
|
#if HAS_HOME_OFFSET
|
|
|
|
extern float home_offset[XYZ];
|
|
|
|
extern float home_offset[XYZ];
|
|
|
@ -203,8 +205,6 @@ void homeaxis(const AxisEnum axis);
|
|
|
|
#if HAS_POSITION_SHIFT
|
|
|
|
#if HAS_POSITION_SHIFT
|
|
|
|
extern float position_shift[XYZ];
|
|
|
|
extern float position_shift[XYZ];
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
|
|
|
|
#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
|
|
|
|
extern float workspace_offset[XYZ];
|
|
|
|
extern float workspace_offset[XYZ];
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
|
|
|
@ -212,26 +212,18 @@ void homeaxis(const AxisEnum axis);
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
|
|
|
|
#elif HAS_POSITION_SHIFT
|
|
|
|
#elif HAS_POSITION_SHIFT
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) 0
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#define NATIVE_TO_LOGICAL(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
|
|
|
|
#define NATIVE_TO_LOGICAL(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
|
|
|
|
#define LOGICAL_TO_NATIVE(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
|
|
|
|
#define LOGICAL_TO_NATIVE(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
|
|
|
|
|
|
|
|
#else
|
|
|
|
#if HAS_POSITION_SHIFT || DISABLED(DELTA)
|
|
|
|
#define NATIVE_TO_LOGICAL(POS, AXIS) (POS)
|
|
|
|
|
|
|
|
#define LOGICAL_TO_NATIVE(POS, AXIS) (POS)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#define LOGICAL_X_POSITION(POS) NATIVE_TO_LOGICAL(POS, X_AXIS)
|
|
|
|
#define LOGICAL_X_POSITION(POS) NATIVE_TO_LOGICAL(POS, X_AXIS)
|
|
|
|
#define LOGICAL_Y_POSITION(POS) NATIVE_TO_LOGICAL(POS, Y_AXIS)
|
|
|
|
#define LOGICAL_Y_POSITION(POS) NATIVE_TO_LOGICAL(POS, Y_AXIS)
|
|
|
|
|
|
|
|
#define LOGICAL_Z_POSITION(POS) NATIVE_TO_LOGICAL(POS, Z_AXIS)
|
|
|
|
#define RAW_X_POSITION(POS) LOGICAL_TO_NATIVE(POS, X_AXIS)
|
|
|
|
#define RAW_X_POSITION(POS) LOGICAL_TO_NATIVE(POS, X_AXIS)
|
|
|
|
#define RAW_Y_POSITION(POS) LOGICAL_TO_NATIVE(POS, Y_AXIS)
|
|
|
|
#define RAW_Y_POSITION(POS) LOGICAL_TO_NATIVE(POS, Y_AXIS)
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define LOGICAL_X_POSITION(POS) (POS)
|
|
|
|
|
|
|
|
#define LOGICAL_Y_POSITION(POS) (POS)
|
|
|
|
|
|
|
|
#define RAW_X_POSITION(POS) (POS)
|
|
|
|
|
|
|
|
#define RAW_Y_POSITION(POS) (POS)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define LOGICAL_Z_POSITION(POS) NATIVE_TO_LOGICAL(POS, Z_AXIS)
|
|
|
|
|
|
|
|
#define RAW_Z_POSITION(POS) LOGICAL_TO_NATIVE(POS, Z_AXIS)
|
|
|
|
#define RAW_Z_POSITION(POS) LOGICAL_TO_NATIVE(POS, Z_AXIS)
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|