dda.c: enable update_current_position() for the new E relative handling.
This commit is contained in:
parent
9dda3349be
commit
ac22a57329
7
dda.c
7
dda.c
|
|
@ -878,16 +878,17 @@ void update_current_position() {
|
||||||
current_position.Z = dda->endpoint.Z +
|
current_position.Z = dda->endpoint.Z +
|
||||||
move_state.z_steps * 1000 / ((STEPS_PER_M_Z + 500) / 1000);
|
move_state.z_steps * 1000 / ((STEPS_PER_M_Z + 500) / 1000);
|
||||||
|
|
||||||
#ifndef E_ABSOLUTE
|
if (dda->endpoint.e_relative) {
|
||||||
current_position.E = move_state.e_steps * 1000 / ((STEPS_PER_M_E + 500) / 1000);
|
current_position.E = move_state.e_steps * 1000 / ((STEPS_PER_M_E + 500) / 1000);
|
||||||
#else
|
}
|
||||||
|
else {
|
||||||
if (dda->e_direction)
|
if (dda->e_direction)
|
||||||
current_position.E = dda->endpoint.E -
|
current_position.E = dda->endpoint.E -
|
||||||
move_state.e_steps * 1000 / ((STEPS_PER_M_E + 500) / 1000);
|
move_state.e_steps * 1000 / ((STEPS_PER_M_E + 500) / 1000);
|
||||||
else
|
else
|
||||||
current_position.E = dda->endpoint.E +
|
current_position.E = dda->endpoint.E +
|
||||||
move_state.e_steps * 1000 / ((STEPS_PER_M_E + 500) / 1000);
|
move_state.e_steps * 1000 / ((STEPS_PER_M_E + 500) / 1000);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// current_position.F is updated in dda_start()
|
// current_position.F is updated in dda_start()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue