瀏覽代碼

Allow larger ADC debounce

Reference #17205
Scott Lahteine 4 年之前
父節點
當前提交
a907e15ae6

+ 1
- 1
Marlin/Configuration_adv.h 查看文件

@@ -1519,7 +1519,7 @@
1519 1519
 // ADC Button Debounce
1520 1520
 //
1521 1521
 #if HAS_ADC_BUTTONS
1522
-  #define ADC_BUTTON_DEBOUNCE_DELAY 16  // (ms) Increase if buttons bounce or repeat too fast
1522
+  #define ADC_BUTTON_DEBOUNCE_DELAY 16  // Increase if buttons bounce or repeat too fast
1523 1523
 #endif
1524 1524
 
1525 1525
 // @section safety

+ 2
- 2
Marlin/src/inc/SanityCheck.h 查看文件

@@ -2976,8 +2976,8 @@ static_assert(   _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2976 2976
   #endif
2977 2977
 #endif
2978 2978
 
2979
-#if HAS_ADC_BUTTONS && defined(ADC_BUTTON_DEBOUNCE_DELAY) && !WITHIN(ADC_BUTTON_DEBOUNCE_DELAY, 16, 255)
2980
-  #error "ADC_BUTTON_DEBOUNCE_DELAY must be an integer from 16 to 255."
2979
+#if HAS_ADC_BUTTONS && defined(ADC_BUTTON_DEBOUNCE_DELAY) && ADC_BUTTON_DEBOUNCE_DELAY < 16
2980
+  #error "ADC_BUTTON_DEBOUNCE_DELAY must be greater than 16."
2981 2981
 #endif
2982 2982
 
2983 2983
 /**

+ 1
- 1
Marlin/src/module/temperature.cpp 查看文件

@@ -351,7 +351,7 @@ volatile bool Temperature::raw_temps_ready = false;
351 351
 
352 352
 #if HAS_ADC_BUTTONS
353 353
   uint32_t Temperature::current_ADCKey_raw = HAL_ADC_RANGE;
354
-  uint8_t Temperature::ADCKey_count = 0;
354
+  uint16_t Temperature::ADCKey_count = 0;
355 355
 #endif
356 356
 
357 357
 #if ENABLED(PID_EXTRUSION_SCALING)

+ 1
- 1
Marlin/src/module/temperature.h 查看文件

@@ -425,7 +425,7 @@ class Temperature {
425 425
   public:
426 426
     #if HAS_ADC_BUTTONS
427 427
       static uint32_t current_ADCKey_raw;
428
-      static uint8_t ADCKey_count;
428
+      static uint16_t ADCKey_count;
429 429
     #endif
430 430
 
431 431
     TERN_(PID_EXTRUSION_SCALING, static int16_t lpq_len);

+ 7
- 0
Marlin/src/pins/ramps/pins_ZRIB_V20.h 查看文件

@@ -69,6 +69,13 @@
69 69
   #undef ADC_KEYPAD_PIN
70 70
   #undef BEEPER_PIN
71 71
 
72
+  #undef SHIFT_OUT
73
+  #undef SHIFT_CLK
74
+  #undef SHIFT_LD
75
+  #undef BTN_EN1
76
+  #undef BTN_EN2
77
+  #undef BTN_ENC
78
+
72 79
   #define LCD_PINS_RS           ZRIB_V20_D16_PIN
73 80
   #define LCD_PINS_ENABLE       ZRIB_V20_D17_PIN
74 81
   #define LCD_PINS_D4           ZRIB_V20_D23_PIN

Loading…
取消
儲存