Replace 'const float &' with 'const_float_t' (#21505)

This commit is contained in:
Scott Lahteine
2021-04-01 17:59:57 -05:00
committed by GitHub
parent 600ef1e47c
commit 62f37669dc
79 changed files with 376 additions and 366 deletions

View File

@@ -71,12 +71,12 @@ public:
#if HAS_PROBE_XY_OFFSET
// Return true if the both nozzle and the probe can reach the given point.
// Note: This won't work on SCARA since the probe offset rotates with the arm.
static bool can_reach(const float &rx, const float &ry) {
static bool can_reach(const_float_t rx, const_float_t ry) {
return position_is_reachable(rx - offset_xy.x, ry - offset_xy.y) // The nozzle can go where it needs to go?
&& position_is_reachable(rx, ry, ABS(PROBING_MARGIN)); // Can the nozzle also go near there?
}
#else
static bool can_reach(const float &rx, const float &ry) {
static bool can_reach(const_float_t rx, const_float_t ry) {
return position_is_reachable(rx, ry, PROBING_MARGIN);
}
#endif
@@ -90,7 +90,7 @@ public:
* Example: For a probe offset of -10,+10, then for the probe to reach 0,0 the
* nozzle must be be able to reach +10,-10.
*/
static bool can_reach(const float &rx, const float &ry) {
static bool can_reach(const_float_t rx, const_float_t ry) {
return position_is_reachable(rx - offset_xy.x, ry - offset_xy.y)
&& COORDINATE_OKAY(rx, min_x() - fslop, max_x() + fslop)
&& COORDINATE_OKAY(ry, min_y() - fslop, max_y() + fslop);
@@ -103,7 +103,7 @@ public:
do_z_clearance(Z_AFTER_PROBING, true); // Move down still permitted
#endif
}
static 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, const bool sanity_check=true);
static float probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true);
static 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, const bool sanity_check=true) {
return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
}
@@ -114,7 +114,7 @@ public:
static bool set_deployed(const bool) { return false; }
static bool can_reach(const float &rx, const float &ry) { return position_is_reachable(rx, ry); }
static bool can_reach(const_float_t rx, const_float_t ry) { return position_is_reachable(rx, ry); }
#endif
@@ -257,7 +257,7 @@ public:
#endif
private:
static bool probe_down_to_z(const float z, const feedRate_t fr_mm_s);
static bool probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s);
static void do_z_raise(const float z_raise);
static float run_z_probe(const bool sanity_check=true);
};