|
|
@ -76,17 +76,17 @@ void recalc_delta_settings(); |
|
|
|
#endif |
|
|
|
|
|
|
|
// Macro to obtain the Z position of an individual tower
|
|
|
|
#define DELTA_Z(T) raw[Z_AXIS] + _SQRT( \ |
|
|
|
delta_diagonal_rod_2_tower[T] - HYPOT2( \ |
|
|
|
delta_tower[T][X_AXIS] - raw[X_AXIS], \ |
|
|
|
delta_tower[T][Y_AXIS] - raw[Y_AXIS] \ |
|
|
|
) \ |
|
|
|
#define DELTA_Z(V,T) V[Z_AXIS] + _SQRT( \ |
|
|
|
delta_diagonal_rod_2_tower[T] - HYPOT2( \ |
|
|
|
delta_tower[T][X_AXIS] - V[X_AXIS], \ |
|
|
|
delta_tower[T][Y_AXIS] - V[Y_AXIS] \ |
|
|
|
) \ |
|
|
|
) |
|
|
|
|
|
|
|
#define DELTA_RAW_IK() do { \ |
|
|
|
delta[A_AXIS] = DELTA_Z(A_AXIS); \ |
|
|
|
delta[B_AXIS] = DELTA_Z(B_AXIS); \ |
|
|
|
delta[C_AXIS] = DELTA_Z(C_AXIS); \ |
|
|
|
#define DELTA_IK(V) do { \ |
|
|
|
delta[A_AXIS] = DELTA_Z(V, A_AXIS); \ |
|
|
|
delta[B_AXIS] = DELTA_Z(V, B_AXIS); \ |
|
|
|
delta[C_AXIS] = DELTA_Z(V, C_AXIS); \ |
|
|
|
}while(0) |
|
|
|
|
|
|
|
void inverse_kinematics(const float raw[XYZ]); |
|
|
|