Browse Source

Update LCD buttons less frequently

Move slow_buttons_update into the LCD_UPDATE_INTERVAL block
lcd_implementation_read_slow_buttons() will then be executed ~10 times a
second.
AnHardt 9 years ago
parent
commit
96d0d04b8f
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/ultralcd.cpp

+ 4
- 4
Marlin/ultralcd.cpp View File

1571
     static millis_t return_to_status_ms = 0;
1571
     static millis_t return_to_status_ms = 0;
1572
   #endif
1572
   #endif
1573
 
1573
 
1574
-  #if ENABLED(LCD_HAS_SLOW_BUTTONS)
1575
-    slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
1576
-  #endif
1577
-
1578
   lcd_buttons_update();
1574
   lcd_buttons_update();
1579
 
1575
 
1580
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
1576
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
1605
   millis_t ms = millis();
1601
   millis_t ms = millis();
1606
   if (ms > next_lcd_update_ms) {
1602
   if (ms > next_lcd_update_ms) {
1607
 
1603
 
1604
+    #if ENABLED(LCD_HAS_SLOW_BUTTONS)
1605
+      slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
1606
+    #endif
1607
+
1608
     #if ENABLED(ULTIPANEL)
1608
     #if ENABLED(ULTIPANEL)
1609
 
1609
 
1610
       #if ENABLED(REPRAPWORLD_KEYPAD)
1610
       #if ENABLED(REPRAPWORLD_KEYPAD)

Loading…
Cancel
Save