Use homing_feedrate function
This commit is contained in:
@ -510,7 +510,7 @@ void do_z_clearance(const float &zclear, const bool z_trusted/*=true*/, const bo
|
||||
const bool rel = raise_on_untrusted && !z_trusted;
|
||||
float zdest = zclear + (rel ? current_position.z : 0.0f);
|
||||
if (!lower_allowed) NOLESS(zdest, current_position.z);
|
||||
do_blocking_move_to_z(_MIN(zdest, Z_MAX_POS), MMM_TO_MMS(TERN(HAS_BED_PROBE, Z_PROBE_SPEED_FAST, HOMING_FEEDRATE_Z)));
|
||||
do_blocking_move_to_z(_MIN(zdest, Z_MAX_POS), TERN(HAS_BED_PROBE, MMM_TO_MMS(Z_PROBE_SPEED_FAST), homing_feedrate(Z_AXIS)));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -73,12 +73,16 @@ extern const feedRate_t homing_feedrate_mm_s[XYZ];
|
||||
FORCE_INLINE feedRate_t homing_feedrate(const AxisEnum a) { return pgm_read_float(&homing_feedrate_mm_s[a]); }
|
||||
feedRate_t get_homing_bump_feedrate(const AxisEnum axis);
|
||||
|
||||
/**
|
||||
* The default feedrate for many moves, set by the most recent move
|
||||
*/
|
||||
extern feedRate_t feedrate_mm_s;
|
||||
|
||||
/**
|
||||
* Feedrate scaling
|
||||
* Feedrate scaling is applied to all G0/G1, G2/G3, and G5 moves
|
||||
*/
|
||||
extern int16_t feedrate_percentage;
|
||||
#define MMS_SCALED(V) ((V) * 0.01f * feedrate_percentage)
|
||||
|
||||
// The active extruder (tool). Set with T<extruder> command.
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
|
@ -978,6 +978,6 @@ class Planner {
|
||||
#endif // !CLASSIC_JERK
|
||||
};
|
||||
|
||||
#define PLANNER_XY_FEEDRATE() (_MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]))
|
||||
#define PLANNER_XY_FEEDRATE() _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS])
|
||||
|
||||
extern Planner planner;
|
||||
|
@ -152,8 +152,8 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
|
||||
inline void run_stow_moves_script() {
|
||||
const xyz_pos_t oldpos = current_position;
|
||||
endstops.enable_z_probe(false);
|
||||
do_blocking_move_to_z(TOUCH_MI_RETRACT_Z, MMM_TO_MMS(HOMING_FEEDRATE_Z));
|
||||
do_blocking_move_to(oldpos, MMM_TO_MMS(HOMING_FEEDRATE_Z));
|
||||
do_blocking_move_to_z(TOUCH_MI_RETRACT_Z, homing_feedrate(Z_AXIS));
|
||||
do_blocking_move_to(oldpos, homing_feedrate(Z_AXIS));
|
||||
}
|
||||
|
||||
#elif ENABLED(Z_PROBE_ALLEN_KEY)
|
||||
@ -664,11 +664,8 @@ float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise
|
||||
}
|
||||
else if (!position_is_reachable(npos)) return NAN; // The given position is in terms of the nozzle
|
||||
|
||||
const float old_feedrate_mm_s = feedrate_mm_s;
|
||||
feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
|
||||
|
||||
// Move the probe to the starting XYZ
|
||||
do_blocking_move_to(npos);
|
||||
do_blocking_move_to(npos, feedRate_t(XY_PROBE_FEEDRATE_MM_S));
|
||||
|
||||
float measured_z = NAN;
|
||||
if (!deploy()) measured_z = run_z_probe(sanity_check) + offset.z;
|
||||
@ -683,8 +680,6 @@ float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise
|
||||
SERIAL_ECHOLNPAIR("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z);
|
||||
}
|
||||
|
||||
feedrate_mm_s = old_feedrate_mm_s;
|
||||
|
||||
if (isnan(measured_z)) {
|
||||
stow();
|
||||
LCD_MESSAGEPGM(MSG_LCD_PROBING_FAILED);
|
||||
|
Reference in New Issue
Block a user