Prompt Z calibration when 7x7 MBL is enabled

This commit is contained in:
Alex Voinea 2024-08-31 13:57:38 +02:00
parent 8196e48684
commit d2119c24e1
3 changed files with 12 additions and 1 deletions

View File

@ -125,6 +125,7 @@ const char MSG_SILENT[] PROGMEM_I1 = ISTR("Silent"); ////MSG_SILENT c=7
const char MSG_NORMAL[] PROGMEM_I1 = ISTR("Normal"); ////MSG_NORMAL c=7
const char MSG_STEALTH[] PROGMEM_I1 = ISTR("Stealth"); ////MSG_STEALTH c=7
const char MSG_STEEL_SHEET_CHECK[] PROGMEM_I1 = ISTR("Is steel sheet on heatbed?"); ////MSG_STEEL_SHEET_CHECK c=20 r=3
const char MSG_Z_CALIBRATION_PROMPT[] PROGMEM_I1 = ISTR("Z calibration recommended. Run it now?"); ////MSG_STEEL_SHEET_CHECK c=20 r=3
const char MSG_STOP_PRINT[] PROGMEM_I1 = ISTR("Stop print"); ////MSG_STOP_PRINT c=18
const char MSG_STOPPED[] PROGMEM_I1 = ISTR("STOPPED."); ////MSG_STOPPED c=20
const char MSG_PINDA_CALIBRATION[] PROGMEM_I1 = ISTR("PINDA cal."); ////MSG_PINDA_CALIBRATION c=13

View File

@ -127,6 +127,7 @@ extern const char MSG_SILENT[];
extern const char MSG_NORMAL[];
extern const char MSG_STEALTH[];
extern const char MSG_STEEL_SHEET_CHECK[];
extern const char MSG_Z_CALIBRATION_PROMPT[];
extern const char MSG_STOP_PRINT[];
extern const char MSG_STOPPED[];
extern const char MSG_PINDA_CALIBRATION[];

View File

@ -5533,10 +5533,19 @@ static void lcd_mesh_bed_leveling_settings()
bool magnet_elimination = (eeprom_read_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION) > 0);
uint8_t points_nr = eeprom_read_byte((uint8_t*)EEPROM_MBL_POINTS_NR);
uint8_t mbl_z_probe_nr = eeprom_read_byte((uint8_t*)EEPROM_MBL_PROBE_NR);
uint8_t mbl_z_probe_nr = eeprom_read_byte((uint8_t*)EEPROM_MBL_PROBE_NR);
char sToggle[4]; //enough for nxn format
MENU_BEGIN();
ON_MENU_LEAVE(
// Prompt user to run Z calibration for best results with region MBL.
if (points_nr == 7) {
uint8_t result = lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_Z_CALIBRATION_PROMPT), true, 0);
if (result == LCD_LEFT_BUTTON_CHOICE) {
lcd_mesh_calibration_z();
}
}
);
MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
sToggle[0] = points_nr + '0';
sToggle[1] = 'x';