DDA: use new generic um_to_steps_* in dda_new_startpoint().

This was contributed by Phil Hord as part of another commit.

It saves 168 bytes, to it more than outweights the overhead of
introducing a generic implementation already.
This commit is contained in:
Markus Hitter 2014-06-09 23:18:46 +02:00
parent 62bdbd86d6
commit 1c19158bbc
1 changed files with 4 additions and 4 deletions

8
dda.c
View File

@ -65,10 +65,10 @@ void dda_init(void) {
This is needed for example after homing or a G92. The new location must be in startpoint already.
*/
void dda_new_startpoint(void) {
startpoint_steps.axis[X] = um_to_steps_x(startpoint.axis[X]);
startpoint_steps.axis[Y] = um_to_steps_y(startpoint.axis[Y]);
startpoint_steps.axis[Z] = um_to_steps_z(startpoint.axis[Z]);
startpoint_steps.axis[E] = um_to_steps_e(startpoint.axis[E]);
enum axis_e i;
for (i = X; i < AXIS_COUNT; i++)
startpoint_steps.axis[i] = um_to_steps(startpoint.axis[i], i);
}
/*! CREATE a dda given current_position and a target, save to passed location so we can write directly into the queue