Merge pull request #2474 from vintagepc/#2161-tune-x-y-rehome
Add X-Y home to tune menu if print is paused
This commit is contained in:
commit
73118dd4e2
|
|
@ -241,6 +241,8 @@ static void lcd_sheet_menu();
|
|||
static void menu_action_sdfile(const char* filename);
|
||||
static void menu_action_sddirectory(const char* filename);
|
||||
|
||||
static void lcd_rehome_xy();
|
||||
|
||||
#define ENCODER_FEEDRATE_DEADZONE 10
|
||||
|
||||
#define STATE_NA 255
|
||||
|
|
@ -5335,6 +5337,15 @@ void stepper_timer_overflow() {
|
|||
}
|
||||
#endif /* DEBUG_STEPPER_TIMER_MISSED */
|
||||
|
||||
static void lcd_rehome_xy() {
|
||||
// Do home directly, G28 X Y resets MBL, which could be bad.
|
||||
homeaxis(X_AXIS);
|
||||
homeaxis(Y_AXIS);
|
||||
lcd_setstatuspgm(_T(MSG_AUTO_HOME));
|
||||
lcd_return_to_status();
|
||||
lcd_draw_update = 3;
|
||||
}
|
||||
|
||||
|
||||
static void lcd_colorprint_change() {
|
||||
|
||||
|
|
@ -5441,7 +5452,9 @@ static void lcd_tune_menu()
|
|||
if (!farm_mode)
|
||||
MENU_ITEM_FUNCTION_P(_T(MSG_FILAMENTCHANGE), lcd_colorprint_change);
|
||||
#endif
|
||||
|
||||
if (isPrintPaused) {// Don't allow rehome if actively printing. Maaaaybe it could work to insert on the fly, seems too risky.
|
||||
MENU_ITEM_FUNCTION_P(_T(MSG_AUTO_HOME), lcd_rehome_xy);
|
||||
}
|
||||
#ifdef FILAMENT_SENSOR
|
||||
MENU_ITEM_SUBMENU_P(_T(MSG_FSENSOR), lcd_fsensor_settings_menu);
|
||||
#endif //FILAMENT_SENSOR
|
||||
|
|
|
|||
Loading…
Reference in New Issue