From 803ff6e8b3827809e0f04067e8e27c309b9fbf85 Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Wed, 22 Jun 2016 19:28:38 -0400 Subject: [PATCH] fix ACCELERATION_REPRAP build (moved/extra vars) REPRAP style acceleration broke quite a while ago, but no one noticed. Maybe it's not being used, and therefore also not tested. But it should at least compile while it remains an option. The compiler complains that dda->n is not defined and that current_id is never used. The first bug goes back to f0b9daeea06c in late 2013. In the interest of supporting exploratory accelerations, fix this to build when ACCELERATION_REPRAP is chosen. --- dda.c | 2 +- dda.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dda.c b/dda.c index bf5db44..fd4b806 100644 --- a/dda.c +++ b/dda.c @@ -756,8 +756,8 @@ void dda_clock() { uint32_t move_step_no, move_c; int32_t move_n; uint8_t recalc_speed; - #endif uint8_t current_id ; + #endif dda = queue_current_movement(); if (dda != last_dda) { diff --git a/dda.h b/dda.h index a1a45db..10a5ea3 100644 --- a/dda.h +++ b/dda.h @@ -119,6 +119,7 @@ typedef struct { #ifdef ACCELERATION_REPRAP uint32_t end_c; ///< time between 2nd last step and last step + int32_t n; ///< precalculated step time offset variable #endif #ifdef ACCELERATION_RAMPING /// precalculated step time offset variable