Cleanup few menus

- Calibrate XYZ
- Calibrate Z
  - Add Sheet messages
- Mesh Bed Leveling
- Reset XYZ calibr.
  - Add Yes/No menu with `No` time out
- Thermal Model cal.
- Add Yes/No menu with `No` time out to Reset in HW Setup -> Sheets ->
- Add timeout to Stop print menu
This commit is contained in:
3d-gussner 2023-12-18 17:07:41 +01:00
parent 38198ec0eb
commit 1bb163fd35
6 changed files with 32 additions and 31 deletions

View File

@ -3164,15 +3164,17 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level)
lcd_wait_for_cool_down();
}
#endif //STEEL_SHEET
if(!onlyZ)
{
KEEPALIVE_STATE(PAUSED_FOR_USER);
#ifdef STEEL_SHEET
uint8_t result = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_STEEL_SHEET_CHECK), false);
if(result == LCD_LEFT_BUTTON_CHOICE) {
if(result == LCD_LEFT_BUTTON_CHOICE && !onlyZ) {
lcd_show_fullscreen_message_and_wait_P(_T(MSG_REMOVE_STEEL_SHEET));
} else if (result == LCD_MIDDLE_BUTTON_CHOICE && onlyZ) {
lcd_show_fullscreen_message_and_wait_P(_T(MSG_PLACE_STEEL_SHEET));
}
#endif //STEEL_SHEET
if(!onlyZ)
{
lcd_show_fullscreen_message_and_wait_P(_T(MSG_PAPER));
KEEPALIVE_STATE(IN_HANDLER);
lcd_display_message_fullscreen_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1));

View File

@ -191,6 +191,8 @@ extern const char MSG_NOZZLE_CNG_MENU [] PROGMEM_I1 = ISTR("Nozzle change");////
extern const char MSG_NOZZLE_CNG_READ_HELP [] PROGMEM_I1 = ISTR("For a Nozzle change please read\nprusa.io/nozzle-mk3s");////MSG_NOZZLE_CNG_READ_HELP c=20 r=4
extern const char MSG_NOZZLE_CNG_CHANGED [] PROGMEM_I1 = ISTR("Hotend at 280C! Nozzle changed and tightened to specs?");////MSG_NOZZLE_CNG_CHANGED c=20 r=6
extern const char MSG_REPRINT [] PROGMEM_I1 = ISTR("Reprint"); ////MSG_REPRINT c=18
extern const char MSG_CALIBRATE_BED_RESET [] PROGMEM_I1 = ISTR("Reset XYZ calibr.");////MSG_CALIBRATE_BED_RESET c=18
//not internationalized messages
#if 0
const char MSG_FW_VERSION_BETA[] PROGMEM_N1 = "You are using a BETA firmware version! It is in a development state! Use this version with CAUTION as it may DAMAGE the printer!"; ////MSG_FW_VERSION_BETA c=20 r=8

View File

@ -192,6 +192,7 @@ extern const char MSG_NOZZLE_CNG_MENU [];
extern const char MSG_NOZZLE_CNG_READ_HELP [];
extern const char MSG_NOZZLE_CNG_CHANGED [];
extern const char MSG_REPRINT [];
extern const char MSG_CALIBRATE_BED_RESET [];
//not internationalized messages
#if 0

View File

@ -3495,24 +3495,6 @@ static void lcd_language_menu()
}
#endif //(LANG_MODE != 0)
void lcd_mesh_bedleveling()
{
enquecommand_P(PSTR("G80"));
lcd_return_to_status();
}
void lcd_mesh_calibration()
{
enquecommand_P(PSTR("M45"));
lcd_return_to_status();
}
void lcd_mesh_calibration_z()
{
enquecommand_P(PSTR("M45 Z"));
lcd_return_to_status();
}
void lcd_temp_calibration_set() {
bool temp_cal_active = eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE);
temp_cal_active = !temp_cal_active;
@ -4562,25 +4544,26 @@ static void lcd_calibration_menu()
#endif //TMC2130
MENU_ITEM_FUNCTION_P(_i("Selftest"), lcd_selftest_v);////MSG_SELFTEST c=18
// MK2
MENU_ITEM_FUNCTION_P(_i("Calibrate XYZ"), lcd_mesh_calibration);////MSG_CALIBRATE_BED c=18
MENU_ITEM_GCODE_P(_i("Calibrate XYZ"), PSTR("M45"));////MSG_CALIBRATE_BED c=18
// "Calibrate Z" with storing the reference values to EEPROM.
MENU_ITEM_SUBMENU_P(_T(MSG_HOMEYZ), lcd_mesh_calibration_z);
MENU_ITEM_GCODE_P(_T(MSG_HOMEYZ), PSTR("M45 Z"));
MENU_ITEM_SUBMENU_P(_T(MSG_MESH_BED_LEVELING), lcd_mesh_bedleveling); ////MSG_MESH_BED_LEVELING c=18
MENU_ITEM_GCODE_P(_T(MSG_MESH_BED_LEVELING), PSTR("G80")); ////MSG_MESH_BED_LEVELING c=18
MENU_ITEM_SUBMENU_P(_i("Bed level correct"), lcd_adjust_bed);////MSG_BED_CORRECTION_MENU c=18
MENU_ITEM_SUBMENU_P(_i("PID calibration"), pid_extruder);////MSG_PID_EXTRUDER c=17
#ifndef TMC2130
MENU_ITEM_SUBMENU_P(_i("Show end stops"), menu_show_end_stops);////MSG_SHOW_END_STOPS c=18
#endif
MENU_ITEM_GCODE_P(_i("Reset XYZ calibr."), PSTR("M44"));////MSG_CALIBRATE_BED_RESET c=18
MENU_ITEM_SUBMENU_P(_T(MSG_CALIBRATE_BED_RESET), lcd_calibration_bed_reset);
#ifdef PINDA_THERMISTOR
if(has_temperature_compensation())
//Keep as function menu to show status screen and process of the calibration
MENU_ITEM_FUNCTION_P(_T(MSG_PINDA_CALIBRATION), lcd_calibrate_pinda);
#endif
#ifdef THERMAL_MODEL
MENU_ITEM_SUBMENU_P(_n("Thermal Model cal."), lcd_thermal_model_cal);
MENU_ITEM_FUNCTION_P(_n("Thermal Model cal."), lcd_thermal_model_cal);
#endif //THERMAL_MODEL
MENU_END();
@ -5083,6 +5066,8 @@ static void lcd_rename_sheet_menu()
static void lcd_reset_sheet()
{
uint8_t result = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_RESET), true, LCD_MIDDLE_BUTTON_CHOICE);
if (result == LCD_LEFT_BUTTON_CHOICE) {
SheetName sheetName;
eeprom_default_sheet_name(selected_sheet, sheetName);
eeprom_update_word(reinterpret_cast<uint16_t *>(&(EEPROM_Sheets_base->s[selected_sheet].z_offset)),EEPROM_EMPTY_VALUE16);
@ -5093,7 +5078,7 @@ static void lcd_reset_sheet()
if (-1 == eeprom_next_initialized_sheet(0))
calibration_status_clear(CALIBRATION_STATUS_LIVE_ADJUST);
}
}
menu_back();
}
@ -5118,7 +5103,7 @@ static void lcd_sheet_menu()
MENU_ITEM_SUBMENU_P(_T(MSG_V2_CALIBRATION), activate_calibrate_sheet);
}
MENU_ITEM_SUBMENU_P(_i("Rename"), lcd_rename_sheet_menu); ////MSG_RENAME c=18
MENU_ITEM_FUNCTION_P(_T(MSG_RESET), lcd_reset_sheet);
MENU_ITEM_SUBMENU_P(_T(MSG_RESET), lcd_reset_sheet);
MENU_END();
}
@ -5695,13 +5680,23 @@ void lcd_thermal_model_cal()
void lcd_sdcard_stop()
{
if (lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_STOP_PRINT), true, LCD_MIDDLE_BUTTON_CHOICE) == LCD_LEFT_BUTTON_CHOICE) {
uint8_t result = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_STOP_PRINT), true, LCD_MIDDLE_BUTTON_CHOICE);
if ( result == LCD_LEFT_BUTTON_CHOICE) {
lcd_print_stop();
} else {
lcd_return_to_status();
}
}
void lcd_calibration_bed_reset()
{
uint8_t result = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_CALIBRATE_BED_RESET), true, LCD_MIDDLE_BUTTON_CHOICE);
if ( result == LCD_LEFT_BUTTON_CHOICE) {
enquecommand_P(PSTR("M44"));
}
lcd_return_to_status();
}
void lcd_sdcard_menu()
{
enum menuState_t : uint8_t {_uninitialized, _standard, _scrolling};

View File

@ -68,7 +68,7 @@ void lcd_load_filament_color_check();
extern void lcd_belttest();
extern bool lcd_selftest();
void lcd_calibration_bed_reset();
void lcd_menu_statistics();
void lcd_status_screen(); // NOT static due to using inside "Marlin_main" module ("manage_inactivity()")

View File

@ -261,7 +261,8 @@ void fCheckModeInit() {
static void render_M862_warnings(const char* warning, const char* strict, uint8_t check)
{
if (check == 1) { // Warning, stop print if user selects 'No'
if (lcd_show_fullscreen_message_yes_no_and_wait_P(warning, true, LCD_LEFT_BUTTON_CHOICE) == LCD_MIDDLE_BUTTON_CHOICE) {
uint8_t result = lcd_show_fullscreen_message_yes_no_and_wait_P(warning, true, LCD_LEFT_BUTTON_CHOICE);
if (result == LCD_MIDDLE_BUTTON_CHOICE) {
lcd_print_stop();
}
} else if (check == 2) { // Strict, always stop print