From ee7701c15bc91f7a05f973e03624fb14815f5027 Mon Sep 17 00:00:00 2001 From: jbuck2005 <59450931+jbuck2005@users.noreply.github.com> Date: Sat, 27 Feb 2021 16:54:43 -0500 Subject: [PATCH] SPEED => FEEDRATE (#21217) --- Marlin/Configuration.h | 6 +++--- Marlin/Configuration_adv.h | 2 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 2 +- Marlin/src/inc/Conditionals_post.h | 4 ++-- Marlin/src/inc/SanityCheck.h | 8 +++++++- Marlin/src/lcd/menu/menu_bed_corners.cpp | 2 +- Marlin/src/lcd/menu/menu_probe_offset.cpp | 2 +- Marlin/src/module/motion.cpp | 6 +++--- Marlin/src/module/motion.h | 6 +++--- Marlin/src/module/probe.cpp | 4 ++-- 10 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b50c884b7e..34f47bf485 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1047,13 +1047,13 @@ #define PROBING_MARGIN 10 // X and Y axis travel speed (mm/min) between probes -#define XY_PROBE_SPEED (133*60) +#define XY_PROBE_FEEDRATE (133*60) // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2) -#define Z_PROBE_SPEED_FAST (4*60) +#define Z_PROBE_FEEDRATE_FAST (4*60) // Feedrate (mm/min) for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) +#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2) /** * Probe Activation Switch diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 0cb78731eb..2fbcf259f6 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -924,7 +924,7 @@ // increments while checking for the contact to be broken. #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) - #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/min) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_FEEDRATE_SLOW // (mm/min) #endif #endif #endif diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index b1e9fcedaa..233e7f7415 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -359,7 +359,7 @@ G29_TYPE GcodeSuite::G29() { #if ABL_GRID - xy_probe_feedrate_mm_s = MMM_TO_MMS(parser.linearval('S', XY_PROBE_SPEED)); + xy_probe_feedrate_mm_s = MMM_TO_MMS(parser.linearval('S', XY_PROBE_FEEDRATE)); const float x_min = probe.min_x(), x_max = probe.max_x(), y_min = probe.min_y(), y_max = probe.max_y(); diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 6de98e2a0e..c800a52fb8 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2479,8 +2479,8 @@ #ifndef Z_PROBE_OFFSET_RANGE_MAX #define Z_PROBE_OFFSET_RANGE_MAX 20 #endif - #ifndef XY_PROBE_SPEED - #define XY_PROBE_SPEED ((homing_feedrate_mm_m.x + homing_feedrate_mm_m.y) / 2) + #ifndef XY_PROBE_FEEDRATE + #define XY_PROBE_FEEDRATE ((homing_feedrate_mm_m.x + homing_feedrate_mm_m.y) / 2) #endif #ifndef NOZZLE_TO_PROBE_OFFSET #define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 } diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 210848d80b..f606ea5d9a 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -131,7 +131,13 @@ #elif defined(DEFAULT_XYJERK) #error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead." #elif defined(XY_TRAVEL_SPEED) - #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead." + #error "XY_TRAVEL_SPEED is now XY_PROBE_FEEDRATE." +#elif defined(XY_PROBE_SPEED) + #error "XY_PROBE_SPEED is now XY_PROBE_FEEDRATE." +#elif defined(Z_PROBE_SPEED_FAST) + #error "Z_PROBE_SPEED_FAST is now Z_PROBE_FEEDRATE_FAST." +#elif defined(Z_PROBE_SPEED_SLOW) + #error "Z_PROBE_SPEED_SLOW is now Z_PROBE_FEEDRATE_SLOW." #elif defined(PROBE_SERVO_DEACTIVATION_DELAY) #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead." #elif defined(SERVO_DEACTIVATION_DELAY) diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index 505b31876a..0dae8dbf41 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -224,7 +224,7 @@ static inline void _lcd_level_bed_corners_get_next_position() { bool _lcd_level_bed_corners_probe(bool verify=false) { if (verify) do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP); // do clearance if needed TERN_(BLTOUCH_SLOW_MODE, bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action - do_blocking_move_to_z(last_z - LEVEL_CORNERS_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_SPEED_SLOW)); // Move down to lower tolerance + do_blocking_move_to_z(last_z - LEVEL_CORNERS_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance if (TEST(endstops.trigger_state(), TERN(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, Z_MIN, Z_MIN_PROBE))) { // check if probe triggered endstops.hit_on_purpose(); set_current_from_steppers_for_axis(Z_AXIS); diff --git a/Marlin/src/lcd/menu/menu_probe_offset.cpp b/Marlin/src/lcd/menu/menu_probe_offset.cpp index 2f0c37b433..3b3fa0fd2a 100644 --- a/Marlin/src/lcd/menu/menu_probe_offset.cpp +++ b/Marlin/src/lcd/menu/menu_probe_offset.cpp @@ -145,7 +145,7 @@ void prepare_for_probe_offset_wizard() { // Move Nozzle to Probing/Homing Position ui.wait_for_move = true; current_position += probe.offset_xy; - line_to_current_position(MMM_TO_MMS(XY_PROBE_SPEED)); + line_to_current_position(MMM_TO_MMS(XY_PROBE_FEEDRATE)); ui.synchronize(GET_TEXT(MSG_PROBE_WIZARD_MOVING)); ui.wait_for_move = false; diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 3e79e7dabf..580700bfe2 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -180,7 +180,7 @@ xyz_pos_t cartes; #endif #if HAS_ABL_NOT_UBL - feedRate_t xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED); + feedRate_t xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_FEEDRATE); #endif /** @@ -1151,7 +1151,7 @@ void prepare_line_to_destination() { */ feedRate_t get_homing_bump_feedrate(const AxisEnum axis) { #if HOMING_Z_WITH_PROBE - if (axis == Z_AXIS) return MMM_TO_MMS(Z_PROBE_SPEED_SLOW); + if (axis == Z_AXIS) return MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW); #endif static const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR; uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]); @@ -1569,7 +1569,7 @@ void prepare_line_to_destination() { if (bump) { // Move away from the endstop by the axis HOMING_BUMP_MM if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Move Away: ", -bump, "mm"); - do_homing_move(axis, -bump, TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_SPEED_FAST) : 0, false); + do_homing_move(axis, -bump, TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_FEEDRATE_FAST) : 0, false); #if ENABLED(DETECT_BROKEN_ENDSTOP) // Check for a broken endstop diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index c8fb2c639b..2595084b4a 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -59,13 +59,13 @@ extern xyz_pos_t cartes; #if HAS_ABL_NOT_UBL extern feedRate_t xy_probe_feedrate_mm_s; #define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s -#elif defined(XY_PROBE_SPEED) - #define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_SPEED) +#elif defined(XY_PROBE_FEEDRATE) + #define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_FEEDRATE) #else #define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE() #endif -constexpr feedRate_t z_probe_fast_mm_s = MMM_TO_MMS(Z_PROBE_SPEED_FAST); +constexpr feedRate_t z_probe_fast_mm_s = MMM_TO_MMS(Z_PROBE_FEEDRATE_FAST); /** * Feed rates are often configured with mm/m diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index d29123bf4d..d7fafc8932 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -619,7 +619,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { // Raise to give the probe clearance do_blocking_move_to_z(current_position.z + Z_CLEARANCE_MULTI_PROBE, z_probe_fast_mm_s); - #elif Z_PROBE_SPEED_FAST != Z_PROBE_SPEED_SLOW + #elif Z_PROBE_FEEDRATE_FAST != Z_PROBE_FEEDRATE_SLOW // If the nozzle is well over the travel height then // move down quickly before doing the slow probe @@ -650,7 +650,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (TERN0(PROBE_TARE, tare())) return true; // Probe downward slowly to find the bed - if (try_to_probe(PSTR("SLOW"), z_probe_low_point, MMM_TO_MMS(Z_PROBE_SPEED_SLOW), + if (try_to_probe(PSTR("SLOW"), z_probe_low_point, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW), sanity_check, Z_CLEARANCE_MULTI_PROBE) ) return NAN; TERN_(MEASURE_BACKLASH_WHEN_PROBING, backlash.measure_with_probe());