Merge pull request #6410 from teemuatlut/LVD-Delta
Delta auto-calibration updates
This commit is contained in:
@ -1816,20 +1816,14 @@ void kill_screen(const char* lcd_msg) {
|
||||
lcd_goto_screen(_lcd_calibrate_homing);
|
||||
}
|
||||
|
||||
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
||||
#define _DELTA_TOWER_MOVE_RADIUS DELTA_CALIBRATION_RADIUS
|
||||
#else
|
||||
#define _DELTA_TOWER_MOVE_RADIUS DELTA_PRINTABLE_RADIUS
|
||||
#endif
|
||||
|
||||
// Move directly to the tower position with uninterpolated moves
|
||||
// If we used interpolated moves it would cause this to become re-entrant
|
||||
void _goto_tower_pos(const float &a) {
|
||||
current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5;
|
||||
line_to_current(Z_AXIS);
|
||||
|
||||
current_position[X_AXIS] = a < 0 ? LOGICAL_X_POSITION(X_HOME_POS) : sin(a) * -(_DELTA_TOWER_MOVE_RADIUS);
|
||||
current_position[Y_AXIS] = a < 0 ? LOGICAL_Y_POSITION(Y_HOME_POS) : cos(a) * (_DELTA_TOWER_MOVE_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) : sin(RADIANS(a)) * delta_calibration_radius;
|
||||
line_to_current(Z_AXIS);
|
||||
|
||||
current_position[Z_AXIS] = 4.0;
|
||||
@ -1841,17 +1835,17 @@ void kill_screen(const char* lcd_msg) {
|
||||
lcd_goto_screen(lcd_move_z);
|
||||
}
|
||||
|
||||
void _goto_tower_x() { _goto_tower_pos(RADIANS(120)); }
|
||||
void _goto_tower_y() { _goto_tower_pos(RADIANS(240)); }
|
||||
void _goto_tower_z() { _goto_tower_pos(0); }
|
||||
void _goto_tower_x() { _goto_tower_pos(210); }
|
||||
void _goto_tower_y() { _goto_tower_pos(330); }
|
||||
void _goto_tower_z() { _goto_tower_pos(90); }
|
||||
void _goto_center() { _goto_tower_pos(-1); }
|
||||
|
||||
void lcd_delta_calibrate_menu() {
|
||||
START_MENU();
|
||||
MENU_BACK(MSG_MAIN);
|
||||
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
||||
MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33 C"));
|
||||
MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 C1"));
|
||||
MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33"));
|
||||
MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 P1 A"));
|
||||
#endif
|
||||
MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home);
|
||||
if (axis_homed[Z_AXIS]) {
|
||||
|
Reference in New Issue
Block a user