From 468b212077fd60acc0d96727d78723ef4066869b Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Thu, 7 Oct 2010 21:02:12 +0200 Subject: [PATCH] Move micrometer conversion from config.h(.dist) to dda.c, where it's used. --- config.h.dist | 6 ------ dda.c | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config.h.dist b/config.h.dist index 4eb00d2..0c5e758 100644 --- a/config.h.dist +++ b/config.h.dist @@ -180,12 +180,6 @@ // -------------------------------------------------------------------------- // you shouldn't need to edit anything below this line -// inverse, used in distance calculation during DDA setup -#define UM_PER_STEP_X ((uint32_t) ((1000.0 / STEPS_PER_MM_X) + 0.5)) -#define UM_PER_STEP_Y ((uint32_t) ((1000.0 / STEPS_PER_MM_Y) + 0.5)) -#define UM_PER_STEP_Z ((uint32_t) ((1000.0 / STEPS_PER_MM_Z) + 0.5)) -#define UM_PER_STEP_E ((uint32_t) ((1000.0 / STEPS_PER_MM_E) + 0.5)) - /* Heater */ diff --git a/dda.c b/dda.c index 5cf6f5a..762fc46 100644 --- a/dda.c +++ b/dda.c @@ -67,6 +67,14 @@ #define unstep() do { _x_step(0); _y_step(0); _z_step(0); _e_step(0); } while (0) +/* + Used in distance calculation during DDA setup +*/ +#define UM_PER_STEP_X ((uint32_t) ((1000.0 / STEPS_PER_MM_X) + 0.5)) +#define UM_PER_STEP_Y ((uint32_t) ((1000.0 / STEPS_PER_MM_Y) + 0.5)) +#define UM_PER_STEP_Z ((uint32_t) ((1000.0 / STEPS_PER_MM_Z) + 0.5)) +#define UM_PER_STEP_E ((uint32_t) ((1000.0 / STEPS_PER_MM_E) + 0.5)) + /* Maths */