Homing feedrates as XYZ array (#20426)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
rafaljot
2020-12-17 13:02:05 +01:00
committed by GitHub
parent 20b3af1cc2
commit fbcc07261d
6 changed files with 34 additions and 31 deletions

View File

@ -143,16 +143,6 @@ xyze_pos_t destination; // {0}
feedRate_t feedrate_mm_s = MMM_TO_MMS(1500);
int16_t feedrate_percentage = 100;
// Homing feedrate is const progmem - compare to constexpr in the header
const feedRate_t homing_feedrate_mm_s[XYZ] PROGMEM = {
#if ENABLED(DELTA)
MMM_TO_MMS(HOMING_FEEDRATE_Z), MMM_TO_MMS(HOMING_FEEDRATE_Z),
#else
MMM_TO_MMS(HOMING_FEEDRATE_XY), MMM_TO_MMS(HOMING_FEEDRATE_XY),
#endif
MMM_TO_MMS(HOMING_FEEDRATE_Z)
};
// Cartesian conversion result goes here:
xyz_pos_t cartes;
@ -195,7 +185,7 @@ xyz_pos_t cartes;
#endif
#if HAS_ABL_NOT_UBL
float xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
feedRate_t xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
#endif
/**
@ -510,7 +500,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), TERN(HAS_BED_PROBE, MMM_TO_MMS(Z_PROBE_SPEED_FAST), homing_feedrate(Z_AXIS)));
do_blocking_move_to_z(_MIN(zdest, Z_MAX_POS), TERN(HAS_BED_PROBE, z_probe_fast_mm_s, homing_feedrate(Z_AXIS)));
}
//
@ -1841,7 +1831,7 @@ void homeaxis(const AxisEnum axis) {
current_position[axis] -= ABS(endstop_backoff[axis]) * axis_home_dir;
line_to_current_position(
#if HOMING_Z_WITH_PROBE
(axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_SPEED_FAST) :
(axis == Z_AXIS) ? z_probe_fast_mm_s :
#endif
homing_feedrate(axis)
);