From 24f5416bbae2364b47b4d1a6c9594ba0372728bb Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Mon, 25 Nov 2013 16:16:18 -0500 Subject: [PATCH] DDA: Rename confusing variable name. 'all_time' sounds like forever to me, but this variable really tracks the last time we hit one of "all the axes". It sticks out more now in looping, so rename it to make sense. --- dda.c | 2 +- dda.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dda.c b/dda.c index 34ac9c5..6f8b48e 100644 --- a/dda.c +++ b/dda.c @@ -651,7 +651,7 @@ void dda_step(DDA *dda) { dda->c = 0xFFFFFFFF; for (i = X; i < AXIS_COUNT; i++) { if (move_state.steps[i]) { - c_candidate = move_state.time[i] + dda->step_interval[i] - move_state.all_time; + c_candidate = move_state.time[i] + dda->step_interval[i] - move_state.last_time; if (c_candidate < dda->c) { dda->axis_to_step = i; dda->c = c_candidate; diff --git a/dda.h b/dda.h index cb7834a..4730353 100644 --- a/dda.h +++ b/dda.h @@ -71,8 +71,8 @@ typedef struct { uint32_t step_no; #endif #ifdef ACCELERATION_TEMPORAL - axes_uint32_t time; ///< time of the last step on each axis - uint32_t all_time; ///< time of the last step of any axis + axes_uint32_t time; ///< time of the last step on each axis + uint32_t last_time; ///< time of the last step of any axis #endif /// Endstop handling.