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:
parent
62bdbd86d6
commit
1c19158bbc
8
dda.c
8
dda.c
|
|
@ -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.
|
This is needed for example after homing or a G92. The new location must be in startpoint already.
|
||||||
*/
|
*/
|
||||||
void dda_new_startpoint(void) {
|
void dda_new_startpoint(void) {
|
||||||
startpoint_steps.axis[X] = um_to_steps_x(startpoint.axis[X]);
|
enum axis_e i;
|
||||||
startpoint_steps.axis[Y] = um_to_steps_y(startpoint.axis[Y]);
|
|
||||||
startpoint_steps.axis[Z] = um_to_steps_z(startpoint.axis[Z]);
|
for (i = X; i < AXIS_COUNT; i++)
|
||||||
startpoint_steps.axis[E] = um_to_steps_e(startpoint.axis[E]);
|
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
|
/*! CREATE a dda given current_position and a target, save to passed location so we can write directly into the queue
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue