More user interaction in MBL

master
Scott Lahteine 9 years ago
parent 240b71ee1c
commit d1c45ff80b

@ -2540,13 +2540,10 @@ char* ftostr52(const float& x) {
} }
} }
/** static void _lcd_level_bed_homing_done() {
* MBL Move to mesh starting point if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Click to Begin"), NULL);
*/ lcdDrawUpdate = LCD_DRAW_UPDATE_CALL_NO_REDRAW;
static void _lcd_level_bed_homing() { if (LCD_CLICKED) {
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_HOMING), NULL);
lcdDrawUpdate = 1;
if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z; current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
current_position[X_AXIS] = MESH_MIN_X; current_position[X_AXIS] = MESH_MIN_X;
@ -2558,9 +2555,19 @@ char* ftostr52(const float& x) {
} }
/** /**
* MBL entry-point * MBL Move to mesh starting point
*/ */
static void lcd_level_bed() { static void _lcd_level_bed_homing() {
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_HOMING), NULL);
lcdDrawUpdate = LCD_DRAW_UPDATE_CALL_NO_REDRAW;
if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS])
lcd_goto_menu(_lcd_level_bed_homing_done);
}
/**
* MBL Continue Bed Leveling...
*/
static void lcd_level_bed_continue() {
defer_return_to_status = true; defer_return_to_status = true;
axis_known_position[X_AXIS] = axis_known_position[Y_AXIS] = axis_known_position[Z_AXIS] = false; axis_known_position[X_AXIS] = axis_known_position[Y_AXIS] = axis_known_position[Z_AXIS] = false;
mbl.reset(); mbl.reset();
@ -2568,6 +2575,16 @@ char* ftostr52(const float& x) {
lcd_goto_menu(_lcd_level_bed_homing, true); lcd_goto_menu(_lcd_level_bed_homing, true);
} }
/**
* MBL entry-point
*/
static void lcd_level_bed() {
START_MENU();
MENU_ITEM(back, "Cancel", lcd_prepare_menu);
MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed_continue);
END_MENU();
}
#endif // MANUAL_BED_LEVELING #endif // MANUAL_BED_LEVELING
#endif // ULTRA_LCD #endif // ULTRA_LCD

Loading…
Cancel
Save