From cd4e16ef9fc216d88dc3a3ad65709fc65baae724 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Fri, 6 Nov 2020 08:25:56 +0100 Subject: [PATCH 1/4] XYZ calibration tune PFW-1159 --- Firmware/xyzcal.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Firmware/xyzcal.cpp b/Firmware/xyzcal.cpp index 060bb13af..7085c4095 100644 --- a/Firmware/xyzcal.cpp +++ b/Firmware/xyzcal.cpp @@ -494,7 +494,11 @@ int8_t xyzcal_find_point_center2(uint16_t delay_us) xyzcal_lineXYZ_to(_X, _Y, z0 + 400, 500, -1); xyzcal_lineXYZ_to(_X, _Y, z0 - 400, 500, 1); - z0 = _Z - 20; + if (has_temperature_compensation()) + z0 = _Z - 20; // normal PINDA + else + z0 = _Z + 10; // alternate PINDA + xyzcal_lineXYZ_to(_X, _Y, z0, 500, 0); // xyzcal_lineXYZ_to(x0, y0, z0 - 100, 500, 1); From 5184910ef9f108330e4868d30980b35c6951c380 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Mon, 9 Nov 2020 06:33:41 +0100 Subject: [PATCH 2/4] Try harder finding the calibration center with alternative PINDAs it looks like their properties vary a lot and searching for the calibration center requires trying different Z levels. --- Firmware/xyzcal.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Firmware/xyzcal.cpp b/Firmware/xyzcal.cpp index 7085c4095..22dfa1817 100644 --- a/Firmware/xyzcal.cpp +++ b/Firmware/xyzcal.cpp @@ -478,7 +478,7 @@ int16_t xyzcal_find_pattern_12x12_in_32x32(uint8_t* pixels, uint16_t* pattern, u #define MAX_DIAMETR 600 #define XYZCAL_FIND_CENTER_DIAGONAL - +int8_t xyzcal_find_point_center2A(int16_t x0, int16_t y0, int16_t z0, uint16_t delay_us); int8_t xyzcal_find_point_center2(uint16_t delay_us) { printf_P(PSTR("xyzcal_find_point_center2\n")); @@ -494,11 +494,25 @@ int8_t xyzcal_find_point_center2(uint16_t delay_us) xyzcal_lineXYZ_to(_X, _Y, z0 + 400, 500, -1); xyzcal_lineXYZ_to(_X, _Y, z0 - 400, 500, 1); - if (has_temperature_compensation()) + if (has_temperature_compensation()){ z0 = _Z - 20; // normal PINDA - else - z0 = _Z + 10; // alternate PINDA + return xyzcal_find_point_center2A(x0, y0, z0, delay_us); + } else { + // try searching harder, each PINDA is different + for(z0 = _Z - 20; z0 < _Z + 60; z0 += 20 ){ // alternate PINDA + int8_t rv = xyzcal_find_point_center2A(x0, y0, z0, delay_us); + printf_P(PSTR(" z0=%d"), z0); + if( rv != 0 ){ + printf_P(PSTR("ok\n")); + return rv; + } else { + printf_P(PSTR("fail\n")); + } + } + } +} +int8_t xyzcal_find_point_center2A(int16_t x0, int16_t y0, int16_t z0, uint16_t delay_us){ xyzcal_lineXYZ_to(_X, _Y, z0, 500, 0); // xyzcal_lineXYZ_to(x0, y0, z0 - 100, 500, 1); From 4747c8c9f5660a525f86e0626983ed5e0a5abfa7 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Mon, 9 Nov 2020 12:29:19 +0100 Subject: [PATCH 3/4] Increase top Z-offset limit based on some test results --- Firmware/xyzcal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/xyzcal.cpp b/Firmware/xyzcal.cpp index 22dfa1817..767024dbe 100644 --- a/Firmware/xyzcal.cpp +++ b/Firmware/xyzcal.cpp @@ -499,7 +499,7 @@ int8_t xyzcal_find_point_center2(uint16_t delay_us) return xyzcal_find_point_center2A(x0, y0, z0, delay_us); } else { // try searching harder, each PINDA is different - for(z0 = _Z - 20; z0 < _Z + 60; z0 += 20 ){ // alternate PINDA + for(z0 = _Z - 20; z0 <= _Z + 140; z0 += 20 ){ // alternate PINDA int8_t rv = xyzcal_find_point_center2A(x0, y0, z0, delay_us); printf_P(PSTR(" z0=%d"), z0); if( rv != 0 ){ From 396ee0fde25898a3b949a3df117b20eb332dd9d7 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Tue, 10 Nov 2020 10:06:10 +0100 Subject: [PATCH 4/4] Version changed (3.9.2 build 3524) --- Firmware/Configuration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index a9bf23e99..45874e317 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -16,8 +16,8 @@ extern uint16_t nPrinterType; extern PGM_P sPrinterName; // Firmware version -#define FW_VERSION "3.9.1" -#define FW_COMMIT_NR 3518 +#define FW_VERSION "3.9.2" +#define FW_COMMIT_NR 3524 // FW_VERSION_UNKNOWN means this is an unofficial build. // The firmware should only be checked into github with this symbol. #define FW_DEV_VERSION FW_VERSION_UNKNOWN