Skip to content

Commit f118f0e

Browse files
committed
Better detection of touch feature
Add secondary way of detecting if touch is enabled, using the 'number of touch sensors'.
1 parent 2123878 commit f118f0e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/EasyButtonTouch.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#if defined(ESP32)
99
#include "EasyButtonTouch.h"
10-
#if defined(SOC_TOUCH_SENSOR_SUPPORTED)
10+
#if defined(SOC_TOUCH_SENSOR_SUPPORTED) || (defined(SOC_TOUCH_SENSOR_NUM) && SOC_TOUCH_SENSOR_NUM > 1)
1111

1212
void EasyButtonTouch::setThreshold(int threshold)
1313
{

src/EasyButtonTouch.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#if !defined(_EasyButtonTouch_h) and defined(ESP32)
99
#define _EasyButtonTouch_h
1010
#include <include/soc/soc_caps.h>
11-
#if defined(SOC_TOUCH_SENSOR_SUPPORTED)
11+
#if defined(SOC_TOUCH_SENSOR_SUPPORTED) || (defined(SOC_TOUCH_SENSOR_NUM) && SOC_TOUCH_SENSOR_NUM > 1)
1212

1313
#include <Arduino.h>
1414
#include <Filter.h>

0 commit comments

Comments
 (0)