♻️ Adjust LCD init, contrast default, settings load

This commit is contained in:
Scott Lahteine
2022-01-22 10:14:47 -06:00
parent 37ee9a47ab
commit d5f2334140
19 changed files with 137 additions and 154 deletions

View File

@@ -1294,16 +1294,7 @@ void setup() {
// UI must be initialized before EEPROM
// (because EEPROM code calls the UI).
#if HAS_DWIN_E3V2_BASIC
SETUP_RUN(DWIN_Startup());
#else
SETUP_RUN(ui.init());
#if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
SETUP_RUN(ui.show_bootscreen());
const millis_t bootscreen_ms = millis();
#endif
SETUP_RUN(ui.reset_status()); // Load welcome message early. (Retained if no errors exist.)
#endif
SETUP_RUN(ui.init());
#if PIN_EXISTS(SAFE_POWER)
#if HAS_DRIVER_SAFE_POWER_PROTECT
@@ -1314,10 +1305,6 @@ void setup() {
#endif
#endif
#if ENABLED(PROBE_TARE)
SETUP_RUN(probe.tare_init());
#endif
#if BOTH(SDSUPPORT, SDCARD_EEPROM_EMULATION)
SETUP_RUN(card.mount()); // Mount media with settings before first_load
#endif
@@ -1325,6 +1312,15 @@ void setup() {
SETUP_RUN(settings.first_load()); // Load data from EEPROM if available (or use defaults)
// This also updates variables in the planner, elsewhere
#if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
SETUP_RUN(ui.show_bootscreen());
const millis_t bootscreen_ms = millis();
#endif
#if ENABLED(PROBE_TARE)
SETUP_RUN(probe.tare_init());
#endif
#if HAS_ETHERNET
SETUP_RUN(ethernet.init());
#endif