|
|
@ -2254,15 +2254,15 @@ void clamp_to_software_endstops(float target[3])
|
|
|
|
#ifdef DELTA
|
|
|
|
#ifdef DELTA
|
|
|
|
void calculate_delta(float cartesian[3])
|
|
|
|
void calculate_delta(float cartesian[3])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
delta[X_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD)
|
|
|
|
delta[X_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
|
|
|
|
- sq(DELTA_TOWER1_X-cartesian[X_AXIS])
|
|
|
|
- sq(DELTA_TOWER1_X-cartesian[X_AXIS])
|
|
|
|
- sq(DELTA_TOWER1_Y-cartesian[Y_AXIS])
|
|
|
|
- sq(DELTA_TOWER1_Y-cartesian[Y_AXIS])
|
|
|
|
) + cartesian[Z_AXIS];
|
|
|
|
) + cartesian[Z_AXIS];
|
|
|
|
delta[Y_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD)
|
|
|
|
delta[Y_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
|
|
|
|
- sq(DELTA_TOWER2_X-cartesian[X_AXIS])
|
|
|
|
- sq(DELTA_TOWER2_X-cartesian[X_AXIS])
|
|
|
|
- sq(DELTA_TOWER2_Y-cartesian[Y_AXIS])
|
|
|
|
- sq(DELTA_TOWER2_Y-cartesian[Y_AXIS])
|
|
|
|
) + cartesian[Z_AXIS];
|
|
|
|
) + cartesian[Z_AXIS];
|
|
|
|
delta[Z_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD)
|
|
|
|
delta[Z_AXIS] = sqrt(DELTA_DIAGONAL_ROD_2
|
|
|
|
- sq(DELTA_TOWER3_X-cartesian[X_AXIS])
|
|
|
|
- sq(DELTA_TOWER3_X-cartesian[X_AXIS])
|
|
|
|
- sq(DELTA_TOWER3_Y-cartesian[Y_AXIS])
|
|
|
|
- sq(DELTA_TOWER3_Y-cartesian[Y_AXIS])
|
|
|
|
) + cartesian[Z_AXIS];
|
|
|
|
) + cartesian[Z_AXIS];
|
|
|
|