From 49e2844213fb4e4af2332f0e45347236f7f86b94 Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Fri, 8 Jul 2011 09:56:43 +1000 Subject: [PATCH] fix bug introduced by 2421b788: dda struct requires c member even with no acceleration, it is used for feedrate --- dda.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dda.h b/dda.h index 26111b8..bad6ce4 100644 --- a/dda.h +++ b/dda.h @@ -104,10 +104,8 @@ typedef struct { /// total number of steps: set to \f$\max(\Delta x, \Delta y, \Delta z, \Delta e)\f$ uint32_t total_steps; - // linear acceleration variables: c and end_c are 24.8 fixed point timer values, n is the tracking variable - #ifndef ACCELERATION_RAMPING - uint32_t c; ///< time until next step - #endif + uint32_t c; ///< time until next step, 24.8 fixed point + #ifdef ACCELERATION_REPRAP uint32_t end_c; ///< time between 2nd last step and last step int32_t n; ///< precalculated step time offset variable. At every step we calculate \f$c = c - (2 c / n)\f$; \f$n+=4\f$. See http://www.embedded.com/columns/technicalinsights/56800129?printable=true for full description