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.