diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index ddd5f98c0..155c6fd2b 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1462,11 +1462,7 @@ void setup() //mbl_mode_init(); mbl_settings_init(); - SilentModeMenu_MMU = eeprom_read_byte((uint8_t*)EEPROM_MMU_STEALTH); - if (SilentModeMenu_MMU == 255) { - SilentModeMenu_MMU = 1; - eeprom_write_byte((uint8_t*)EEPROM_MMU_STEALTH, SilentModeMenu_MMU); - } + eeprom_init_default_byte((uint8_t*)EEPROM_MMU_STEALTH, 1); #if !defined(DEBUG_DISABLE_FANCHECK) && defined(FANCHECK) && defined(TACH_1) && TACH_1 >-1 setup_fan_interrupt(); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 6f7c2328e..a53a25ba1 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -66,7 +66,6 @@ int8_t ReInitLCD = 0; uint8_t scrollstuff = 0; int8_t SilentModeMenu = SILENT_MODE_OFF; -uint8_t SilentModeMenu_MMU = 1; //activate mmu unit stealth mode int8_t FSensorStateMenu = 1; @@ -3416,10 +3415,8 @@ Sound_CycleState(); } #ifndef MMU_FORCE_STEALTH_MODE -static void lcd_silent_mode_mmu_set() { - if (SilentModeMenu_MMU == 1) SilentModeMenu_MMU = 0; - else SilentModeMenu_MMU = 1; - //saving to eeprom is done in mmu_loop() after mmu actually switches state and confirms with "ok" +static void lcd_mmu_mode_toggle() { + eeprom_toggle((uint8_t*)EEPROM_MMU_STEALTH); } #endif //MMU_FORCE_STEALTH_MODE @@ -4221,8 +4218,7 @@ do\ {\ if (MMU2::mmu2.Enabled())\ {\ - if (SilentModeMenu_MMU == 0) MENU_ITEM_TOGGLE_P(_T(MSG_MMU_MODE), _T(MSG_NORMAL), lcd_silent_mode_mmu_set);\ - else MENU_ITEM_TOGGLE_P(_T(MSG_MMU_MODE), _T(MSG_STEALTH), lcd_silent_mode_mmu_set);\ + MENU_ITEM_TOGGLE_P(_T(MSG_MMU_MODE), eeprom_read_byte((uint8_t*)EEPROM_MMU_STEALTH) ? _T(MSG_STEALTH) : _T(MSG_NORMAL), lcd_mmu_mode_toggle);\ }\ }\ while (0) diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index 04ac697f1..96ceac1fe 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -163,7 +163,6 @@ void printf_IRSensorAnalogBoardChange(); #endif //IR_SENSOR_ANALOG extern int8_t SilentModeMenu; -extern uint8_t SilentModeMenu_MMU; extern bool cancel_heatup; extern bool isPrintPaused;