File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 77
88#if defined(ESP32)
99#include " EasyButtonTouch.h"
10+ #if defined(SOC_TOUCH_SENSOR_SUPPORTED) || (defined(SOC_TOUCH_SENSOR_NUM) && SOC_TOUCH_SENSOR_NUM > 1)
1011
1112void EasyButtonTouch::setThreshold (int threshold)
1213{
@@ -33,5 +34,5 @@ bool EasyButtonTouch::_readPin()
3334 ADCFilter.Filter (touchRead (_pin));
3435 return ADCFilter.Current () < _touch_threshold;
3536}
36-
37+ # endif
3738#endif
Original file line number Diff line number Diff line change 77
88#if !defined(_EasyButtonTouch_h) and defined(ESP32)
99#define _EasyButtonTouch_h
10+ #include < include/soc/soc_caps.h>
11+ #if defined(SOC_TOUCH_SENSOR_SUPPORTED) || (defined(SOC_TOUCH_SENSOR_NUM) && SOC_TOUCH_SENSOR_NUM > 1)
1012
1113#include < Arduino.h>
1214#include < Filter.h>
@@ -26,5 +28,5 @@ class EasyButtonTouch : public EasyButton
2628
2729 bool _readPin ();
2830};
29-
31+ # endif
3032#endif
You can’t perform that action at this time.
0 commit comments