From cca2994dd8c909956c293885532b4d785a37c09c Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Fri, 26 Dec 2014 21:13:42 +0100 Subject: [PATCH] dda.c: fix debug statement position. It's always a good idea to read a structure _after_ filling it :-) --- dda.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dda.c b/dda.c index c5d4f2c..b179a13 100644 --- a/dda.c +++ b/dda.c @@ -172,14 +172,14 @@ void dda_create(DDA *dda, TARGET *target) { if (dda->waitfor_temp) return; + // We end at the passed target. + memcpy(&(dda->endpoint), target, sizeof(TARGET)); + if (DEBUG_DDA && (debug_flags & DEBUG_DDA)) sersendf_P(PSTR("\nCreate: X %lq Y %lq Z %lq F %lu\n"), dda->endpoint.axis[X], dda->endpoint.axis[Y], dda->endpoint.axis[Z], dda->endpoint.F); - // we end at the passed target - memcpy(&(dda->endpoint), target, sizeof(TARGET)); - #ifdef LOOKAHEAD // Set the start and stop speeds to zero for now = full stops between // moves. Also fallback if lookahead calculations fail to finish in time.