From 28502a2b6e9084c91152385c51f2e2a640095877 Mon Sep 17 00:00:00 2001 From: gudnimg Date: Tue, 23 Apr 2024 07:10:11 +0000 Subject: [PATCH] optimisation: remove 1 more call to __divsf3 Changing (feedrate * feedmultiply) / 6000.f to (feedrate * feedmultiply) * (1.f / 6000.f) Replaces the call to __divsf3 with __mulsf3 which is better No change in memory --- Firmware/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index a46c94ed6..46f445bc6 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -9574,7 +9574,7 @@ void prepare_move(uint16_t start_segment_idx) void prepare_arc_move(bool isclockwise, uint16_t start_segment_idx) { float r = hypot(offset[X_AXIS], offset[Y_AXIS]); // Compute arc radius for mc_arc // Trace the arc - mc_arc(current_position, destination, offset, (feedrate * feedmultiply) / 6000.f, r, isclockwise, start_segment_idx); + mc_arc(current_position, destination, offset, (feedrate * feedmultiply) * (1.f / 6000.f), r, isclockwise, start_segment_idx); // As far as the parser is concerned, the position is now == target. In reality the // motion control system might still be processing the action and the real tool position // in any intermediate location.