From cf325ba240b574baab41ed0d5a990827d2fe9cbf Mon Sep 17 00:00:00 2001 From: fsantini Date: Thu, 28 Aug 2014 21:10:50 +0200 Subject: [PATCH 1/4] Fix issue 935: error in matrix calculation --- Marlin/vector_3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/vector_3.cpp b/Marlin/vector_3.cpp index 82b6925b8d..5f1c294ed5 100644 --- a/Marlin/vector_3.cpp +++ b/Marlin/vector_3.cpp @@ -121,7 +121,7 @@ matrix_3x3 matrix_3x3::create_look_at(vector_3 target) { vector_3 z_row = target.get_normal(); vector_3 x_row = vector_3(1, 0, -target.x/target.z).get_normal(); - vector_3 y_row = vector_3(0, 1, -target.y/target.z).get_normal(); + vector_3 y_row = vector_3::cross(z_row, x_row).get_normal(); // x_row.debug("x_row"); // y_row.debug("y_row"); From 37799f70ba078a209ff436e47b2a8be20439c7da Mon Sep 17 00:00:00 2001 From: Charles Bell Date: Thu, 4 Sep 2014 14:36:39 -0400 Subject: [PATCH 2/4] Corrected retract() call for use of auto probe without sled enabled. --- Marlin/Marlin_main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index b42cb952a2..957e24ca9e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1136,8 +1136,10 @@ static void homeaxis(int axis) { } #endif #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0) -// if (axis==Z_AXIS) retract_z_probe(); -#endif + #ifndef Z_PROBE_SLED + if (axis==Z_AXIS) retract_z_probe(); + #endif# +endif } } From 3b8216bdd110fdae6894b75b0380f6b19fbd7cbd Mon Sep 17 00:00:00 2001 From: Charles Bell Date: Thu, 4 Sep 2014 16:40:22 -0400 Subject: [PATCH 3/4] Corrected #endif and ifdef for Z_PROBE_SLED code. --- Marlin/Marlin_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 957e24ca9e..ca9449f2da 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1138,8 +1138,8 @@ static void homeaxis(int axis) { #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0) #ifndef Z_PROBE_SLED if (axis==Z_AXIS) retract_z_probe(); - #endif# -endif + #endif +#endif } } @@ -1193,7 +1193,7 @@ void refresh_cmd_timeout(void) } //retract #endif //FWRETRACT -#ifdef ENABLE_AUTO_BED_LEVELING +#ifdef Z_PROBE_SLED // // Method to dock/undock a sled designed by Charles Bell. // From 01e9b536cbd49cc08f43ee019ea05711615c4087 Mon Sep 17 00:00:00 2001 From: Bracken Dawson Date: Fri, 19 Sep 2014 19:42:32 +0100 Subject: [PATCH 4/4] Fix build for non-sled bed auto levelling This function should only be used with sled, not all bed auto levelling. --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 493d64985a..2113dbfa5c 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1268,7 +1268,7 @@ void refresh_cmd_timeout(void) } //retract #endif //FWRETRACT -#ifdef ENABLE_AUTO_BED_LEVELING +#ifdef Z_PROBE_SLED // // Method to dock/undock a sled designed by Charles Bell. //