Explorar el Código

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 hace 9 años
padre
commit
96d0d04b8f
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4
    4
      Marlin/ultralcd.cpp

+ 4
- 4
Marlin/ultralcd.cpp Ver fichero

@@ -1571,10 +1571,6 @@ void lcd_update() {
1571 1571
     static millis_t return_to_status_ms = 0;
1572 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 1574
   lcd_buttons_update();
1579 1575
 
1580 1576
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
@@ -1605,6 +1601,10 @@ void lcd_update() {
1605 1601
   millis_t ms = millis();
1606 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 1608
     #if ENABLED(ULTIPANEL)
1609 1609
 
1610 1610
       #if ENABLED(REPRAPWORLD_KEYPAD)

Loading…
Cancelar
Guardar