From 6e30d1bef18bbb2f07bbe1c0b212636ab6907850 Mon Sep 17 00:00:00 2001 From: Luc Van Daele Date: Fri, 13 Apr 2018 03:19:42 +0200 Subject: [PATCH] [1.1.x] G33 MIN_STEPS_PER_SEGMENT (#10385) --- Marlin/Marlin_main.cpp | 2 +- Marlin/SanityCheck.h | 2 ++ .../delta/FLSUN/auto_calibrate/Configuration.h | 2 +- .../example_configurations/delta/FLSUN/kossel/Configuration.h | 2 +- .../delta/FLSUN/kossel_mini/Configuration.h | 2 +- .../example_configurations/delta/Hatchbox_Alpha/Configuration.h | 2 +- Marlin/example_configurations/delta/generic/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_mini/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_pro/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_xl/Configuration.h | 2 +- Marlin/ultralcd.cpp | 2 +- 11 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4c57185377..84b7cd1071 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3095,7 +3095,7 @@ static 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 diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 02db155090..e7983c2f35 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/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 needs to be at least 1" #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/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 8ab7443a85..5e7428fe6d 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -529,7 +529,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/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index 017cd2e063..094a65feb7 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -529,7 +529,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/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 3e2efd79ad..05c996baf5 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -529,7 +529,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/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index 49ae2e6d1f..561547fca2 100644 --- a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h @@ -534,7 +534,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/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index ab6c041fcc..ed03c4d872 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -519,7 +519,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/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 7f3bc5113e..d46cae1fd7 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -519,7 +519,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/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 95d114a160..6c99848b1c 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -505,7 +505,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/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index d727bdb90e..66518cbe0a 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -523,7 +523,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/ultralcd.cpp b/Marlin/ultralcd.cpp index 928962d39c..e47a4b2c4a 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -2715,7 +2715,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); }