From 4b2f682d596199b60b8419f3865a76e87fa3e514 Mon Sep 17 00:00:00 2001 From: John Robertson Date: Sun, 17 Mar 2024 17:06:28 +0000 Subject: [PATCH] Update planner.h fix minimal_step_rate calc --- Marlin/src/module/planner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index a97630784f..5f04a8185c 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -261,7 +261,7 @@ typedef struct PlannerBlock { final_adv_steps; // Advance steps for exit speed pressure #endif - #define MINIMAL_STEP_RATE _MIN((1 / (STEPPER_TIMER_RATE / HAL_TIMER_TYPE_MAX), 1) // to prevent timer overflow? + #define MINIMAL_STEP_RATE _MAX((STEPPER_TIMER_RATE / HAL_TIMER_TYPE_MAX), 1) // steps/s max. To prevent timer overflow, slowest is 1 step/s uint32_t nominal_rate, // The nominal step rate for this block in step_events/sec initial_rate, // The jerk-adjusted step rate at start of block final_rate, // The minimal rate at exit