Patch up Delta Calibration Menu
This commit is contained in:
parent
b4dbf4d18a
commit
641e0936d4
6 changed files with 48 additions and 27 deletions
|
@ -453,10 +453,7 @@
|
|||
#define DELTA_PRINTABLE_RADIUS 160.0
|
||||
|
||||
// Delta calibration menu
|
||||
// uncomment to add three points calibration menu option.
|
||||
// See http://minow.blogspot.com/index.html#4918805519571907051
|
||||
// If needed, adjust the X, Y, Z calibration coordinates
|
||||
// in ultralcd.cpp@lcd_delta_calibrate_menu()
|
||||
//#define DELTA_CALIBRATION_MENU
|
||||
|
||||
// After homing move down to a height where XY movement is unconstrained
|
||||
|
|
|
@ -453,10 +453,7 @@
|
|||
#define DELTA_PRINTABLE_RADIUS 140.0
|
||||
|
||||
// Delta calibration menu
|
||||
// uncomment to add three points calibration menu option.
|
||||
// See http://minow.blogspot.com/index.html#4918805519571907051
|
||||
// If needed, adjust the X, Y, Z calibration coordinates
|
||||
// in ultralcd.cpp@lcd_delta_calibrate_menu()
|
||||
//#define DELTA_CALIBRATION_MENU
|
||||
|
||||
// After homing move down to a height where XY movement is unconstrained
|
||||
|
|
|
@ -453,10 +453,7 @@
|
|||
#define DELTA_PRINTABLE_RADIUS 90.0
|
||||
|
||||
// Delta calibration menu
|
||||
// uncomment to add three points calibration menu option.
|
||||
// See http://minow.blogspot.com/index.html#4918805519571907051
|
||||
// If needed, adjust the X, Y, Z calibration coordinates
|
||||
// in ultralcd.cpp@lcd_delta_calibrate_menu()
|
||||
//#define DELTA_CALIBRATION_MENU
|
||||
|
||||
// After homing move down to a height where XY movement is unconstrained
|
||||
|
|
|
@ -440,10 +440,7 @@
|
|||
#define DELTA_PRINTABLE_RADIUS 127.0
|
||||
|
||||
// Delta calibration menu
|
||||
// uncomment to add three points calibration menu option.
|
||||
// See http://minow.blogspot.com/index.html#4918805519571907051
|
||||
// If needed, adjust the X, Y, Z calibration coordinates
|
||||
// in ultralcd.cpp@lcd_delta_calibrate_menu()
|
||||
//#define DELTA_CALIBRATION_MENU
|
||||
|
||||
// After homing move down to a height where XY movement is unconstrained
|
||||
|
|
|
@ -451,10 +451,7 @@
|
|||
#define DELTA_PRINTABLE_RADIUS 140.0
|
||||
|
||||
// Delta calibration menu
|
||||
// uncomment to add three points calibration menu option.
|
||||
// See http://minow.blogspot.com/index.html#4918805519571907051
|
||||
// If needed, adjust the X, Y, Z calibration coordinates
|
||||
// in ultralcd.cpp@lcd_delta_calibrate_menu()
|
||||
//#define DELTA_CALIBRATION_MENU
|
||||
|
||||
// After homing move down to a height where XY movement is unconstrained
|
||||
|
|
|
@ -1367,14 +1367,50 @@ KeepDrawing:
|
|||
END_MENU();
|
||||
}
|
||||
|
||||
float move_menu_scale;
|
||||
|
||||
#if ENABLED(DELTA_CALIBRATION_MENU)
|
||||
|
||||
void lcd_move_z();
|
||||
void lcd_delta_calibrate_menu();
|
||||
|
||||
void _lcd_calibrate_homing() {
|
||||
if (lcdDrawUpdate) lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, PSTR(MSG_LEVEL_BED_HOMING));
|
||||
lcdDrawUpdate =
|
||||
#if ENABLED(DOGLCD)
|
||||
LCDVIEW_CALL_REDRAW_NEXT
|
||||
#else
|
||||
LCDVIEW_CALL_NO_REDRAW
|
||||
#endif
|
||||
;
|
||||
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
|
||||
lcd_goto_previous_menu();
|
||||
}
|
||||
|
||||
void _lcd_delta_calibrate_home() {
|
||||
enqueue_and_echo_commands_P(PSTR("G28"));
|
||||
lcd_goto_screen(_lcd_calibrate_homing);
|
||||
}
|
||||
|
||||
// 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) {
|
||||
do_blocking_move_to(
|
||||
a < 0 ? X_HOME_POS : sin(a) * -(DELTA_PRINTABLE_RADIUS),
|
||||
a < 0 ? Y_HOME_POS : cos(a) * (DELTA_PRINTABLE_RADIUS),
|
||||
4
|
||||
);
|
||||
if (no_reentrance) return;
|
||||
|
||||
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 ? X_HOME_POS : sin(a) * -(DELTA_PRINTABLE_RADIUS);
|
||||
current_position[Y_AXIS] = a < 0 ? Y_HOME_POS : cos(a) * (DELTA_PRINTABLE_RADIUS);
|
||||
line_to_current(Z_AXIS);
|
||||
|
||||
current_position[Z_AXIS] = 4.0;
|
||||
line_to_current(Z_AXIS);
|
||||
|
||||
lcd_synchronize();
|
||||
|
||||
move_menu_scale = 0.1;
|
||||
lcd_goto_screen(lcd_move_z);
|
||||
}
|
||||
|
||||
void _goto_tower_x() { _goto_tower_pos(RADIANS(120)); }
|
||||
|
@ -1385,18 +1421,18 @@ KeepDrawing:
|
|||
void lcd_delta_calibrate_menu() {
|
||||
START_MENU();
|
||||
MENU_BACK(MSG_MAIN);
|
||||
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
|
||||
MENU_ITEM(function, MSG_DELTA_CALIBRATE_X, _goto_tower_x);
|
||||
MENU_ITEM(function, MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
|
||||
MENU_ITEM(function, MSG_DELTA_CALIBRATE_Z, _goto_tower_z);
|
||||
MENU_ITEM(function, MSG_DELTA_CALIBRATE_CENTER, _goto_center);
|
||||
MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home);
|
||||
if (axis_homed[Z_AXIS]) {
|
||||
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_X, _goto_tower_x);
|
||||
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
|
||||
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Z, _goto_tower_z);
|
||||
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_CENTER, _goto_center);
|
||||
}
|
||||
END_MENU();
|
||||
}
|
||||
|
||||
#endif // DELTA_CALIBRATION_MENU
|
||||
|
||||
float move_menu_scale;
|
||||
|
||||
/**
|
||||
* If the most recent manual move hasn't been fed to the planner yet,
|
||||
* and the planner can accept one, send immediately
|
||||
|
|
Reference in a new issue