Soft reset printer after disabling mmu

This commit is contained in:
Przemek Grondek 2022-11-26 12:01:12 +01:00
parent 04923a9ec5
commit 8dfc32c246

View File

@ -2289,7 +2289,7 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
lcd_draw_update = 1; lcd_draw_update = 1;
lcd_clear(); lcd_clear();
lcd_puts_at_P(0, 3, _T(MSG_CANCEL)); ////MSG_CANCEL lcd_puts_at_P(0, 3, _T(MSG_CANCEL));////MSG_CANCEL
lcd_set_cursor(0, 1); lcd_set_cursor(0, 1);
switch (eFilamentAction) switch (eFilamentAction)
@ -4504,7 +4504,7 @@ static void lcd_language_menu()
#ifdef COMMUNITY_LANG_SUPPORT #ifdef COMMUNITY_LANG_SUPPORT
#ifdef XFLASH #ifdef XFLASH
MENU_ITEM_SUBMENU_P(_T(MSG_COMMUNITY_MADE), lcd_community_language_menu); ////MSG_COMMUNITY_MADE c=18 MENU_ITEM_SUBMENU_P(_T(MSG_COMMUNITY_MADE), lcd_community_language_menu);////MSG_COMMUNITY_MADE c=18
#endif //XFLASH #endif //XFLASH
#endif //COMMUNITY_LANG_SUPPORT && W52X20CL #endif //COMMUNITY_LANG_SUPPORT && W52X20CL
@ -4703,7 +4703,7 @@ void lcd_first_layer_calibration_reset()
eeprom_read_block(sheet_name, &EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].name, sizeof(Sheet::name)); eeprom_read_block(sheet_name, &EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].name, sizeof(Sheet::name));
lcd_set_cursor(0, 0); lcd_set_cursor(0, 0);
float offset = static_cast<int16_t>(eeprom_read_word(reinterpret_cast<uint16_t*>(&EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)))/cs.axis_steps_per_unit[Z_AXIS]; float offset = static_cast<int16_t>(eeprom_read_word(reinterpret_cast<uint16_t*>(&EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)))/cs.axis_steps_per_unit[Z_AXIS];
lcd_printf_P(_i("Sheet %.7s\nZ offset: %+1.3f mm\n%cContinue\n%cStart from zero"), //// \n denotes line break, %.7s is replaced by 7 character long sheet name, %+1.3f is replaced by 6 character long floating point number, %c is replaced by > or white space (one character) based on whether first or second option is selected. % denoted place holders can not be reordered. r=4 lcd_printf_P(_i("Sheet %.7s\nZ offset: %+1.3f mm\n%cContinue\n%cStart from zero"), //// \n denotes line break, %.7s is replaced by 7 character long sheet name, %+1.3f is replaced by 6 character long floating point number, %c is replaced by > or white space (one character) based on whether first or second option is selected. % denoted place holders can not be reordered.r=4
sheet_name, offset, menuData->reset ? ' ' : '>', menuData->reset ? '>' : ' '); sheet_name, offset, menuData->reset ? ' ' : '>', menuData->reset ? '>' : ' ');
} }
@ -5183,6 +5183,7 @@ static void disable_mmu_switch()
{ {
MMU_Disabled_from_menu = !MMU_Disabled_from_menu; MMU_Disabled_from_menu = !MMU_Disabled_from_menu;
eeprom_update_byte((unsigned char *)EEPROM_MMU_DISABLED_FROM_MENU, MMU_Disabled_from_menu); eeprom_update_byte((unsigned char *)EEPROM_MMU_DISABLED_FROM_MENU, MMU_Disabled_from_menu);
softReset();
} }
static bool settingsDisableMMUFromMenu() static bool settingsDisableMMUFromMenu()
@ -6144,7 +6145,6 @@ char reset_menu() {
, PSTR("Bowden length") , PSTR("Bowden length")
#endif #endif
}; };
enc_dif = lcd_encoder_diff; enc_dif = lcd_encoder_diff;
lcd_clear(); lcd_clear();
lcd_set_cursor(0, 0); lcd_set_cursor(0, 0);