Minor speedup for SCARA scaling
And cleanup of Delta IK macros...
This commit is contained in:
parent
6f40d57e14
commit
b5677907d0
3 changed files with 22 additions and 34 deletions
|
|
@ -321,17 +321,17 @@ void report_current_position();
|
|||
#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)
|
||||
|
||||
#elif IS_SCARA
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue