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.
This commit is contained in:
parent
bc4cf20341
commit
24f5416bba
2
dda.c
2
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;
|
||||
|
|
|
|||
4
dda.h
4
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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue