dda.c: enable update_current_position() for the new E relative handling.

This commit is contained in:
Markus Hitter 2012-03-05 22:27:17 +01:00
parent 9dda3349be
commit ac22a57329
1 changed files with 4 additions and 3 deletions

7
dda.c
View File

@ -878,16 +878,17 @@ void update_current_position() {
current_position.Z = dda->endpoint.Z +
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);
#else
}
else {
if (dda->e_direction)
current_position.E = dda->endpoint.E -
move_state.e_steps * 1000 / ((STEPS_PER_M_E + 500) / 1000);
else
current_position.E = dda->endpoint.E +
move_state.e_steps * 1000 / ((STEPS_PER_M_E + 500) / 1000);
#endif
}
// current_position.F is updated in dda_start()
}