Browse Source

Made encoderPosition and quick_feedback dependant on NEWPANEL

where the hardware is available.
Fix for #1873
AnHardt 10 years ago
parent
commit
df50523605
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      Marlin/ultralcd.cpp

+ 7
- 4
Marlin/ultralcd.cpp View File

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…
Cancel
Save