From 7a47bf30be79c6b9e9c042dbd6384eccad28a592 Mon Sep 17 00:00:00 2001 From: Alexandra Voinea Date: Wed, 20 Nov 2024 09:28:21 +0100 Subject: [PATCH] Fix end of meander overextrusion with new pattern --- Firmware/first_lay_cal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Firmware/first_lay_cal.cpp b/Firmware/first_lay_cal.cpp index 0fad63b6d..3c04819de 100644 --- a/Firmware/first_lay_cal.cpp +++ b/Firmware/first_lay_cal.cpp @@ -210,7 +210,9 @@ void lay1cal_meander(float layer_height, float extrusion_width) enquecommandf_P(extrude_fmt_Y, invert * -short_length, short_extrusion); } #ifdef NEW_FIRST_LAYER_CAL - enquecommandf_P(extrude_fmt_X, -(long_length/2-square_width/2), long_extrusion); //~Middle of bed X125 + constexpr float mid_length = 0.5f * long_length - 0.5f * square_width; + const float mid_extrusion = count_e(layer_height, extrusion_width, mid_length); + enquecommandf_P(extrude_fmt_X, -mid_length, mid_extrusion); //~Middle of bed X125 enquecommandf_P(extrude_fmt_Y, short_length, short_extrusion); //~Middle of bed Y105 #endif //NEW_FIRST_LAYER_CAL