Ruwan J Egoda Gamage пре 9 година
родитељ
комит
a64bcd53e9
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4
    3
      Marlin/ultralcd.cpp

+ 4
- 3
Marlin/ultralcd.cpp Прегледај датотеку

@@ -1860,8 +1860,10 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
1860 1860
       #if BTN_EN2 > 0
1861 1861
         if (READ(BTN_EN2) == 0) newbutton |= EN_B;
1862 1862
       #endif
1863
-      #if ENABLED(RIGIDBOT_PANEL)
1863
+      #if ENABLED(RIGIDBOT_PANEL) || BTN_ENC > 0
1864 1864
         millis_t now = millis();
1865
+      #endif
1866
+      #if ENABLED(RIGIDBOT_PANEL)
1865 1867
         if (now > next_button_update_ms) {
1866 1868
           if (READ(BTN_UP) == 0) {
1867 1869
             encoderDiff = -1 * ENCODER_STEPS_PER_MENU_ITEM;
@@ -1881,9 +1883,8 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
1881 1883
           }
1882 1884
         }
1883 1885
       #endif
1884
-
1885 1886
       #if BTN_ENC > 0
1886
-        if (millis() > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C;
1887
+        if (now > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C;
1887 1888
       #endif
1888 1889
       buttons = newbutton;
1889 1890
       #if ENABLED(LCD_HAS_SLOW_BUTTONS)

Loading…
Откажи
Сачувај