From 12785583d0d79375b8b089c7b5fb2f118ea2cedd Mon Sep 17 00:00:00 2001 From: Luc Van Daele Date: Fri, 13 Apr 2018 03:22:29 +0200 Subject: [PATCH] [2.0.x] G33 MIN_STEPS_PER_SEGMENT (#10386) --- .../config/examples/delta/FLSUN/auto_calibrate/Configuration.h | 2 +- Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h | 2 +- .../src/config/examples/delta/FLSUN/kossel_mini/Configuration.h | 2 +- Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h | 2 +- Marlin/src/config/examples/delta/generic/Configuration.h | 2 +- Marlin/src/config/examples/delta/kossel_mini/Configuration.h | 2 +- Marlin/src/config/examples/delta/kossel_pro/Configuration.h | 2 +- Marlin/src/config/examples/delta/kossel_xl/Configuration.h | 2 +- Marlin/src/inc/SanityCheck.h | 2 ++ Marlin/src/lcd/ultralcd.cpp | 2 +- Marlin/src/module/motion.cpp | 2 +- 11 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index d7147abfab..25f86f6cf4 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -538,7 +538,7 @@ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 73.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP (MIN_STEPS_PER_SEGMENT / DEFAULT_XYZ_STEPS_PER_UNIT) + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h index 0f16caf87b..0e893d761b 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h @@ -538,7 +538,7 @@ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 63 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP (MIN_STEPS_PER_SEGMENT / DEFAULT_XYZ_STEPS_PER_UNIT) + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 9fc4ff527b..60d64f08fd 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -538,7 +538,7 @@ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 73.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP (MIN_STEPS_PER_SEGMENT / DEFAULT_XYZ_STEPS_PER_UNIT) + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). diff --git a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h index 14145a058b..eb73d39753 100644 --- a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h @@ -543,7 +543,7 @@ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP (MIN_STEPS_PER_SEGMENT / DEFAULT_XYZ_STEPS_PER_UNIT) + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index cb911075b3..61b5f54d00 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -528,7 +528,7 @@ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP (MIN_STEPS_PER_SEGMENT / DEFAULT_XYZ_STEPS_PER_UNIT) + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 5b6b2d63d5..6b65c7bbb4 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -528,7 +528,7 @@ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 78.0 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP (MIN_STEPS_PER_SEGMENT / DEFAULT_XYZ_STEPS_PER_UNIT) + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index ddc65c3c04..a5247a39bc 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -514,7 +514,7 @@ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 110.0 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP (MIN_STEPS_PER_SEGMENT / DEFAULT_XYZ_STEPS_PER_UNIT) + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index a8282f87db..15b2848950 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -532,7 +532,7 @@ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // mm // Set the steprate for papertest probing - #define PROBE_MANUALLY_STEP (MIN_STEPS_PER_SEGMENT / DEFAULT_XYZ_STEPS_PER_UNIT) + #define PROBE_MANUALLY_STEP 0.05 // mm #endif // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 210246a9cc..f930530d76 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -181,6 +181,8 @@ #error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE. Please update your configuration." #elif !defined(MIN_STEPS_PER_SEGMENT) #error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h. +#elif MIN_STEPS_PER_SEGMENT <= 0 + #error "MIN_STEPS_PER_SEGMENT must be at least 1. Please update your Configuration_adv.h." #elif defined(PREVENT_DANGEROUS_EXTRUDE) #error "PREVENT_DANGEROUS_EXTRUDE is now PREVENT_COLD_EXTRUSION. Please update your configuration." #elif defined(SCARA) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 442caf6434..fbefa11391 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -2721,7 +2721,7 @@ void kill_screen(const char* lcd_msg) { do_blocking_move_to_xy(rx, ry); lcd_synchronize(); - move_menu_scale = PROBE_MANUALLY_STEP; + move_menu_scale = max(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT)); lcd_goto_screen(lcd_move_z); } diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index ecd31a7ea5..c2a76836af 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1354,7 +1354,7 @@ void homeaxis(const AxisEnum axis) { #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("delta_endstop_adj:"); #endif - do_homing_move(axis, delta_endstop_adj[axis] - MIN_STEPS_PER_SEGMENT / planner.axis_steps_per_mm[axis] * Z_HOME_DIR); + do_homing_move(axis, delta_endstop_adj[axis] - (MIN_STEPS_PER_SEGMENT + 1) * planner.steps_to_mm[axis] * Z_HOME_DIR); } #else