@@ -6,21 +6,51 @@ menu "Touch Button Sensor Configuration"
66 help
77 Enable touch button sensor debug mode.
88
9+ config TOUCH_BUTTON_SENSOR_CALIBRATION_TIMES
10+ int "Calibration times"
11+ default 50 if !IDF_TARGET_ESP32
12+ default 20
13+ range 10 1000
14+ help
15+ Number of readings used for initial calibration.
16+
17+ config TOUCH_BUTTON_SENSOR_DEBOUNCE_INACTIVE
18+ int "Debounce inactive count"
19+ default 3 if !IDF_TARGET_ESP32
20+ default 1
21+ range 1 50
22+ help
23+ Number of consecutive readings below threshold needed to confirm inactive state.
24+
25+ config TOUCH_BUTTON_SENSOR_POLLING_INTERVAL
26+ int "Polling interval (ms)"
27+ default 10
28+ range 5 100
29+ depends on IDF_TARGET_ESP32
30+ help
31+ Interval between polling touch readings in milliseconds (for ESP32 only).
32+
933 config TOUCH_BUTTON_SENSOR_SMOOTH_COEF_X1000
1034 int "Smooth coefficient (/1000)"
11- default 200
35+ default 200 if IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32S2
36+ default 300 if IDF_TARGET_ESP32
37+ default 600 if IDF_TARGET_ESP32P4
38+ default 500
1239 range 0 1000
1340 help
1441 Coefficient for smooth filter, multiplied by 1000.
1542 For example, 200 means 0.2
1643
1744 config TOUCH_BUTTON_SENSOR_BASELINE_COEF_X1000
1845 int "Baseline coefficient (/1000)"
19- default 5
46+ default 100 if IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32S2
47+ default 150 if IDF_TARGET_ESP32
48+ default 200 if IDF_TARGET_ESP32P4
49+ default 100
2050 range 0 1000
2151 help
2252 Coefficient for baseline filter, multiplied by 1000.
23- For example, 5 means 0.005
53+ For example, 100 means 0.1
2454
2555 config TOUCH_BUTTON_SENSOR_MAX_P_X1000
2656 int "Maximum positive change ratio (/1000)"
@@ -46,42 +76,45 @@ menu "Touch Button Sensor Configuration"
4676
4777 config TOUCH_BUTTON_SENSOR_NOISE_P_SNR
4878 int "Positive noise SNR"
49- default 10
50- range 2 100
79+ default 4
80+ range 3 100
5181 help
5282 Signal-to-noise for positive Noise
5383
5484 config TOUCH_BUTTON_SENSOR_NOISE_N_SNR
5585 int "Negative noise SNR"
56- default 5
86+ default 4
5787 range 2 100
5888 help
5989 Signal-to-noise for negative Noise
6090
61- config TOUCH_BUTTON_SENSOR_RESET_P
62- int "Reset positive count"
63- default 1000
91+ config TOUCH_BUTTON_SENSOR_RESET_COVER
92+ int "Reset count from cover"
93+ default 1000 if !IDF_TARGET_ESP32
94+ default 300
6495 range 0 5000
6596 help
66- Reset count for positive threshold . 0 means no reset.
97+ Reset count if cover is detected . 0 means no reset.
6798
68- config TOUCH_BUTTON_SENSOR_RESET_N
69- int "Reset negative count"
70- default 30
71- range 0 5000
99+ config TOUCH_BUTTON_SENSOR_RESET_CALIBRATION
100+ int "Reset count from calibration error "
101+ default 3
102+ range 0 100
72103 help
73104 Reset count for negative threshold. 0 means no reset.
74105
75106 config TOUCH_BUTTON_SENSOR_RAW_BUF_SIZE
76107 int "Raw buffer size"
77- default 20
108+ default 40 if !IDF_TARGET_ESP32
109+ default 10
78110 range 10 100
79111 help
80112 Size of raw data buffer.
81113
82114 config TOUCH_BUTTON_SENSOR_SCALE_FACTOR
83115 int "Scale factor"
84- default 100
116+ default 100 if !IDF_TARGET_ESP32
117+ default 1000
85118 range 10 1000
86119 help
87120 Scale factor for threshold calculation.
0 commit comments