Selaa lähdekoodia

Merge pull request #1877 from AnHardt/display-only

Made encoderPosition and quick_feedback dependant on NEWPANEL
Scott Lahteine 10 vuotta sitten
vanhempi
commit
7a1aef1450
1 muutettua tiedostoa jossa 7 lisäystä ja 4 poistoa
  1. 7
    4
      Marlin/ultralcd.cpp

+ 7
- 4
Marlin/ultralcd.cpp Näytä tiedosto

251
 static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool feedback=true) {
251
 static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder=0, const bool feedback=true) {
252
   if (currentMenu != menu) {
252
   if (currentMenu != menu) {
253
     currentMenu = menu;
253
     currentMenu = menu;
254
-    encoderPosition = encoder;
255
-    if (feedback) lcd_quick_feedback();
256
-
254
+    #if defined(NEWPANEL)
255
+      encoderPosition = encoder;
256
+      if (feedback) lcd_quick_feedback();
257
+    #endif
257
     // For LCD_PROGRESS_BAR re-initialize the custom characters
258
     // For LCD_PROGRESS_BAR re-initialize the custom characters
258
     #ifdef LCD_PROGRESS_BAR
259
     #ifdef LCD_PROGRESS_BAR
259
       lcd_set_custom_characters(menu == lcd_status_screen);
260
       lcd_set_custom_characters(menu == lcd_status_screen);
1259
 }
1260
 }
1260
 
1261
 
1261
 void lcd_update() {
1262
 void lcd_update() {
1262
-  static unsigned long timeoutToStatus = 0;
1263
+  #ifdef ULTIPANEL
1264
+    static unsigned long timeoutToStatus = 0;
1265
+  #endif
1263
 
1266
 
1264
   #ifdef LCD_HAS_SLOW_BUTTONS
1267
   #ifdef LCD_HAS_SLOW_BUTTONS
1265
     slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
1268
     slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context

Loading…
Peruuta
Tallenna