Add custom types for position (#15204)
This commit is contained in:
@ -29,9 +29,9 @@
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
|
||||
constexpr float nozzle_to_probe_offset[XYZ] = NOZZLE_TO_PROBE_OFFSET;
|
||||
constexpr xyz_pos_t nozzle_to_probe_offset = NOZZLE_TO_PROBE_OFFSET;
|
||||
|
||||
extern float probe_offset[XYZ];
|
||||
extern xyz_pos_t probe_offset;
|
||||
|
||||
bool set_probe_deployed(const bool deploy);
|
||||
#ifdef Z_AFTER_PROBING
|
||||
@ -44,6 +44,9 @@
|
||||
PROBE_PT_BIG_RAISE // Raise to big clearance after run_z_probe
|
||||
};
|
||||
float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true);
|
||||
inline float probe_at_point(const xy_pos_t &pos, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true) {
|
||||
return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative);
|
||||
}
|
||||
#define DEPLOY_PROBE() set_probe_deployed(true)
|
||||
#define STOW_PROBE() set_probe_deployed(false)
|
||||
#if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
|
||||
@ -52,7 +55,8 @@
|
||||
|
||||
#else
|
||||
|
||||
constexpr float probe_offset[XYZ] = { 0 };
|
||||
constexpr xyz_pos_t probe_offset{0};
|
||||
|
||||
#define DEPLOY_PROBE()
|
||||
#define STOW_PROBE()
|
||||
|
||||
@ -64,7 +68,7 @@
|
||||
#if IS_KINEMATIC
|
||||
PROBE_X_MIN, MESH_MIN_X
|
||||
#else
|
||||
(X_MIN_BED) + (MIN_PROBE_EDGE_LEFT), (X_MIN_POS) + probe_offset[X_AXIS]
|
||||
(X_MIN_BED) + (MIN_PROBE_EDGE_LEFT), (X_MIN_POS) + probe_offset.x
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -73,7 +77,7 @@
|
||||
#if IS_KINEMATIC
|
||||
PROBE_X_MAX, MESH_MAX_X
|
||||
#else
|
||||
(X_MAX_BED) - (MIN_PROBE_EDGE_RIGHT), (X_MAX_POS) + probe_offset[X_AXIS]
|
||||
(X_MAX_BED) - (MIN_PROBE_EDGE_RIGHT), (X_MAX_POS) + probe_offset.x
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -82,7 +86,7 @@
|
||||
#if IS_KINEMATIC
|
||||
PROBE_Y_MIN, MESH_MIN_Y
|
||||
#else
|
||||
(Y_MIN_BED) + (MIN_PROBE_EDGE_FRONT), (Y_MIN_POS) + probe_offset[Y_AXIS]
|
||||
(Y_MIN_BED) + (MIN_PROBE_EDGE_FRONT), (Y_MIN_POS) + probe_offset.y
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -91,7 +95,7 @@
|
||||
#if IS_KINEMATIC
|
||||
PROBE_Y_MAX, MESH_MAX_Y
|
||||
#else
|
||||
(Y_MAX_BED) - (MIN_PROBE_EDGE_BACK), (Y_MAX_POS) + probe_offset[Y_AXIS]
|
||||
(Y_MAX_BED) - (MIN_PROBE_EDGE_BACK), (Y_MAX_POS) + probe_offset.y
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user