From d8945e84644405e247ad99e63d257356bce26383 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 2 Aug 2016 15:03:35 -0700 Subject: [PATCH 1/2] Fix Z_HEAD index for COREYZ --- Marlin/enum.h | 2 +- Marlin/planner.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/enum.h b/Marlin/enum.h index cbdfd4a417..a51d208aee 100644 --- a/Marlin/enum.h +++ b/Marlin/enum.h @@ -42,7 +42,7 @@ enum AxisEnum { E_AXIS = 3, X_HEAD = 4, Y_HEAD = 5, - Z_HEAD = 5 + Z_HEAD = 6 }; #define LOOP_XYZ(VAR) for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index d786824e19..f738d56c40 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -782,7 +782,7 @@ void Planner::check_axes_activity() { * Having the real displacement of the head, we can calculate the total movement length and apply the desired speed. */ #if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ) - float delta_mm[6]; + float delta_mm[7]; #if ENABLED(COREXY) delta_mm[X_HEAD] = dx * steps_to_mm[A_AXIS]; delta_mm[Y_HEAD] = dy * steps_to_mm[B_AXIS]; From 14c5a46ee9863de6a9d303405291789a953a64b1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 2 Aug 2016 15:03:55 -0700 Subject: [PATCH 2/2] Use multiplication for MMM_SCALED --- Marlin/Marlin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index a0f996887a..3aa0aff67f 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -261,7 +261,7 @@ extern int feedrate_percentage; #define MMM_TO_MMS(MM_M) ((MM_M)/60.0) #define MMS_TO_MMM(MM_S) ((MM_S)*60.0) -#define MMM_SCALED(MM_M) ((MM_M)*feedrate_percentage/100.0) +#define MMM_SCALED(MM_M) ((MM_M)*feedrate_percentage*0.01) #define MMS_SCALED(MM_S) MMM_SCALED(MM_S) #define MMM_TO_MMS_SCALED(MM_M) (MMS_SCALED(MMM_TO_MMS(MM_M)))