M666 normalize positive values to <=0
M666 + tower radians absolute value
This commit is contained in:
parent
d8102aeca8
commit
7a6a1ef583
|
@ -5202,7 +5202,7 @@ inline void gcode_G28() {
|
||||||
LOOP_XYZ(axis) endstop_adj[axis] += e_delta[axis];
|
LOOP_XYZ(axis) endstop_adj[axis] += e_delta[axis];
|
||||||
delta_radius += r_delta;
|
delta_radius += r_delta;
|
||||||
|
|
||||||
const float z_temp = MAX3(endstop_adj[0], endstop_adj[1], endstop_adj[2]);
|
const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
|
||||||
home_offset[Z_AXIS] -= z_temp;
|
home_offset[Z_AXIS] -= z_temp;
|
||||||
LOOP_XYZ(i) endstop_adj[i] -= z_temp;
|
LOOP_XYZ(i) endstop_adj[i] -= z_temp;
|
||||||
|
|
||||||
|
@ -7570,6 +7570,10 @@ inline void gcode_M205() {
|
||||||
SERIAL_ECHOLNPGM("<<< gcode_M666");
|
SERIAL_ECHOLNPGM("<<< gcode_M666");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
// normalize endstops so all are <=0; set the residue to delta height
|
||||||
|
const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
|
||||||
|
home_offset[Z_AXIS] -= z_temp;
|
||||||
|
LOOP_XYZ(i) endstop_adj[i] -= z_temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif ENABLED(Z_DUAL_ENDSTOPS) // !DELTA && ENABLED(Z_DUAL_ENDSTOPS)
|
#elif ENABLED(Z_DUAL_ENDSTOPS) // !DELTA && ENABLED(Z_DUAL_ENDSTOPS)
|
||||||
|
@ -10552,10 +10556,10 @@ void ok_to_send() {
|
||||||
void recalc_delta_settings(float radius, float diagonal_rod) {
|
void recalc_delta_settings(float radius, float diagonal_rod) {
|
||||||
const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
|
const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
|
||||||
drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
|
drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
|
||||||
delta_tower[A_AXIS][X_AXIS] = -cos(RADIANS(30 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]); // front left tower
|
delta_tower[A_AXIS][X_AXIS] = cos(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]); // front left tower
|
||||||
delta_tower[A_AXIS][Y_AXIS] = -sin(RADIANS(30 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]);
|
delta_tower[A_AXIS][Y_AXIS] = sin(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]);
|
||||||
delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(30 - delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]); // front right tower
|
delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]); // front right tower
|
||||||
delta_tower[B_AXIS][Y_AXIS] = -sin(RADIANS(30 - delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]);
|
delta_tower[B_AXIS][Y_AXIS] = sin(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]);
|
||||||
delta_tower[C_AXIS][X_AXIS] = 0.0; // back middle tower
|
delta_tower[C_AXIS][X_AXIS] = 0.0; // back middle tower
|
||||||
delta_tower[C_AXIS][Y_AXIS] = (radius + trt[C_AXIS]);
|
delta_tower[C_AXIS][Y_AXIS] = (radius + trt[C_AXIS]);
|
||||||
delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + drt[A_AXIS]);
|
delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + drt[A_AXIS]);
|
||||||
|
|
|
@ -1811,8 +1811,8 @@ void kill_screen(const char* lcd_msg) {
|
||||||
current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5;
|
current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5;
|
||||||
line_to_current(Z_AXIS);
|
line_to_current(Z_AXIS);
|
||||||
|
|
||||||
current_position[X_AXIS] = a < 0 ? LOGICAL_X_POSITION(X_HOME_POS) : sin(a) * -(delta_calibration_radius);
|
current_position[X_AXIS] = a < 0 ? LOGICAL_X_POSITION(X_HOME_POS) : cos(RADIANS(a)) * delta_calibration_radius;
|
||||||
current_position[Y_AXIS] = a < 0 ? LOGICAL_Y_POSITION(Y_HOME_POS) : cos(a) * (delta_calibration_radius);
|
current_position[Y_AXIS] = a < 0 ? LOGICAL_Y_POSITION(Y_HOME_POS) : sin(RADIANS(a)) * delta_calibration_radius;
|
||||||
line_to_current(Z_AXIS);
|
line_to_current(Z_AXIS);
|
||||||
|
|
||||||
current_position[Z_AXIS] = 4.0;
|
current_position[Z_AXIS] = 4.0;
|
||||||
|
@ -1824,9 +1824,9 @@ void kill_screen(const char* lcd_msg) {
|
||||||
lcd_goto_screen(lcd_move_z);
|
lcd_goto_screen(lcd_move_z);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _goto_tower_x() { _goto_tower_pos(RADIANS(120)); }
|
void _goto_tower_x() { _goto_tower_pos(210); }
|
||||||
void _goto_tower_y() { _goto_tower_pos(RADIANS(240)); }
|
void _goto_tower_y() { _goto_tower_pos(330); }
|
||||||
void _goto_tower_z() { _goto_tower_pos(0); }
|
void _goto_tower_z() { _goto_tower_pos(90); }
|
||||||
void _goto_center() { _goto_tower_pos(-1); }
|
void _goto_center() { _goto_tower_pos(-1); }
|
||||||
|
|
||||||
void lcd_delta_calibrate_menu() {
|
void lcd_delta_calibrate_menu() {
|
||||||
|
|
Loading…
Reference in a new issue