♻️ Adjust LCD init, contrast default, settings load
This commit is contained in:
@ -1965,8 +1965,10 @@ void MarlinSettings::postprocess() {
|
||||
//
|
||||
#if HAS_USER_THERMISTORS
|
||||
{
|
||||
user_thermistor_t user_thermistor[USER_THERMISTORS];
|
||||
_FIELD_TEST(user_thermistor);
|
||||
EEPROM_READ(thermalManager.user_thermistor);
|
||||
EEPROM_READ(user_thermistor);
|
||||
if (!validating) COPY(thermalManager.user_thermistor, user_thermistor);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1974,13 +1976,10 @@ void MarlinSettings::postprocess() {
|
||||
// Power monitor
|
||||
//
|
||||
{
|
||||
#if HAS_POWER_MONITOR
|
||||
uint8_t &power_monitor_flags = power_monitor.flags;
|
||||
#else
|
||||
uint8_t power_monitor_flags;
|
||||
#endif
|
||||
uint8_t power_monitor_flags;
|
||||
_FIELD_TEST(power_monitor_flags);
|
||||
EEPROM_READ(power_monitor_flags);
|
||||
TERN_(HAS_POWER_MONITOR, if (!validating) power_monitor.flags = power_monitor_flags);
|
||||
}
|
||||
|
||||
//
|
||||
@ -1997,7 +1996,6 @@ void MarlinSettings::postprocess() {
|
||||
// LCD Brightness
|
||||
//
|
||||
{
|
||||
_FIELD_TEST(lcd_brightness);
|
||||
uint8_t lcd_brightness;
|
||||
EEPROM_READ(lcd_brightness);
|
||||
TERN_(HAS_LCD_BRIGHTNESS, if (!validating) ui.set_brightness(lcd_brightness));
|
||||
@ -2007,45 +2005,37 @@ void MarlinSettings::postprocess() {
|
||||
// Controller Fan
|
||||
//
|
||||
{
|
||||
controllerFan_settings_t cfs = { 0 };
|
||||
_FIELD_TEST(controllerFan_settings);
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
const controllerFan_settings_t &cfs = controllerFan.settings;
|
||||
#else
|
||||
controllerFan_settings_t cfs = { 0 };
|
||||
#endif
|
||||
EEPROM_READ(cfs);
|
||||
TERN_(CONTROLLER_FAN_EDITABLE, if (!validating) controllerFan.settings = cfs);
|
||||
}
|
||||
|
||||
//
|
||||
// Power-Loss Recovery
|
||||
//
|
||||
{
|
||||
bool recovery_enabled;
|
||||
_FIELD_TEST(recovery_enabled);
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
const bool &recovery_enabled = recovery.enabled;
|
||||
#else
|
||||
bool recovery_enabled;
|
||||
#endif
|
||||
EEPROM_READ(recovery_enabled);
|
||||
TERN_(POWER_LOSS_RECOVERY, if (!validating) recovery.enabled = recovery_enabled);
|
||||
}
|
||||
|
||||
//
|
||||
// Firmware Retraction
|
||||
//
|
||||
{
|
||||
fwretract_settings_t fwretract_settings;
|
||||
bool autoretract_enabled;
|
||||
_FIELD_TEST(fwretract_settings);
|
||||
EEPROM_READ(fwretract_settings);
|
||||
EEPROM_READ(autoretract_enabled);
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
EEPROM_READ(fwretract.settings);
|
||||
#else
|
||||
fwretract_settings_t fwretract_settings;
|
||||
EEPROM_READ(fwretract_settings);
|
||||
#endif
|
||||
#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT)
|
||||
EEPROM_READ(fwretract.autoretract_enabled);
|
||||
#else
|
||||
bool autoretract_enabled;
|
||||
EEPROM_READ(autoretract_enabled);
|
||||
if (!validating) {
|
||||
fwretract.settings = fwretract_settings;
|
||||
TERN_(FWRETRACT_AUTORETRACT, fwretract.autoretract_enabled = autoretract_enabled);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user