Browse Source

♻️ No ui.reinit_lcd on any ExtUI (#23722)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
InsanityAutomation 3 years ago
parent
commit
03516f0519
No account linked to committer's email address
3 changed files with 6 additions and 6 deletions
  1. 2
    2
      Marlin/src/inc/Conditionals_post.h
  2. 2
    4
      Marlin/src/lcd/marlinui.cpp
  3. 2
    0
      Marlin/src/lcd/marlinui.h

+ 2
- 2
Marlin/src/inc/Conditionals_post.h View File

459
 
459
 
460
 #endif
460
 #endif
461
 
461
 
462
-#if ANY(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI) || !PIN_EXISTS(SD_DETECT)
463
-  #define NO_LCD_REINIT 1  // Suppress LCD re-initialization
462
+#if PIN_EXISTS(SD_DETECT) && NONE(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI, EXTENSIBLE_UI)
463
+  #define REINIT_NOISY_LCD 1  // Have the LCD re-init on SD insertion
464
 #endif
464
 #endif
465
 
465
 
466
 /**
466
 /**

+ 2
- 4
Marlin/src/lcd/marlinui.cpp View File

625
           next_filament_display = millis() + 5000UL;  // Show status message for 5s
625
           next_filament_display = millis() + 5000UL;  // Show status message for 5s
626
         #endif
626
         #endif
627
         goto_screen(menu_main);
627
         goto_screen(menu_main);
628
-        IF_DISABLED(NO_LCD_REINIT, init_lcd()); // May revive the LCD if static electricity killed it
628
+        reinit_lcd(); // Revive a noisy shared SPI LCD
629
         return;
629
         return;
630
       }
630
       }
631
 
631
 
1697
       }
1697
       }
1698
     }
1698
     }
1699
 
1699
 
1700
-    #if PIN_EXISTS(SD_DETECT) && DISABLED(NO_LCD_REINIT)
1701
-      init_lcd(); // Revive a noisy shared SPI LCD
1702
-    #endif
1700
+    reinit_lcd(); // Revive a noisy shared SPI LCD
1703
 
1701
 
1704
     refresh();
1702
     refresh();
1705
 
1703
 

+ 2
- 0
Marlin/src/lcd/marlinui.h View File

209
     static void init_lcd() {}
209
     static void init_lcd() {}
210
   #endif
210
   #endif
211
 
211
 
212
+  static void reinit_lcd() { TERN_(REINIT_NOISY_LCD, init_lcd()); }
213
+
212
   #if HAS_WIRED_LCD
214
   #if HAS_WIRED_LCD
213
     static bool detected();
215
     static bool detected();
214
   #else
216
   #else

Loading…
Cancel
Save