CoreXY, dda_kinematics.c/.h: introduce KINEMATICS_COREXY.
Implementation isn't that difficult, should be complete and working fine already.
This commit is contained in:
parent
be0af71b2e
commit
2651c10404
|
|
@ -18,3 +18,19 @@ carthesian_to_carthesian(TARGET *startpoint, TARGET *target,
|
|||
steps[i] = um_to_steps(target->axis[i], i);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
carthesian_to_corexy(TARGET *startpoint, TARGET *target,
|
||||
axes_uint32_t delta_um, axes_int32_t steps) {
|
||||
|
||||
delta_um[X] = (uint32_t)labs((target->axis[X] - startpoint->axis[X]) +
|
||||
(target->axis[Y] - startpoint->axis[Y]));
|
||||
steps[X] = um_to_steps(target->axis[X] + target->axis[Y], X);
|
||||
|
||||
delta_um[Y] = (uint32_t)labs((target->axis[X] - startpoint->axis[X]) -
|
||||
(target->axis[Y] - startpoint->axis[Y]));
|
||||
steps[Y] = um_to_steps(target->axis[X] - target->axis[Y], Y);
|
||||
|
||||
delta_um[Z] = (uint32_t)labs(target->axis[Z] - startpoint->axis[Z]);
|
||||
steps[Z] = um_to_steps(target->axis[Z], Z);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "dda.h"
|
||||
|
||||
#define KINEMATICS_STRAIGHT 1
|
||||
//#define KINEMATICS_COREXY 2
|
||||
#define KINEMATICS_COREXY 2
|
||||
//#define KINEMATICS_SCARA 3
|
||||
|
||||
#include "config_wrapper.h"
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
void carthesian_to_carthesian(TARGET *startpoint, TARGET *target,
|
||||
axes_uint32_t delta_um, axes_int32_t steps);
|
||||
|
||||
//void carthesian_to_corexy(TARGET *startpoint, TARGET *target,
|
||||
// axes_uint32_t delta_um, axes_int32_t steps);
|
||||
void carthesian_to_corexy(TARGET *startpoint, TARGET *target,
|
||||
axes_uint32_t delta_um, axes_int32_t steps);
|
||||
|
||||
//void carthesian_to_scara(TARGET *startpoint, TARGET *target,
|
||||
// axes_uint32_t delta_um, axes_int32_t steps);
|
||||
|
|
@ -29,8 +29,8 @@ inline void code_axes_to_stepper_axes(TARGET *startpoint, TARGET *target,
|
|||
axes_int32_t steps) {
|
||||
#if KINEMATICS == KINEMATICS_STRAIGHT
|
||||
carthesian_to_carthesian(startpoint, target, delta_um, steps);
|
||||
// #elif KINEMATICS == KINEMATICS_COREXY
|
||||
// carthesian_to_corexy(startpoint, target, delta_um, steps);
|
||||
#elif KINEMATICS == KINEMATICS_COREXY
|
||||
carthesian_to_corexy(startpoint, target, delta_um, steps);
|
||||
// #elif KINEMATICS == KINEMATICS_SCARA
|
||||
// return carthesian_to_scara(startpoint, target, delta_um, steps);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in New Issue