File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ static touch_volt_lim_h_t _volt_high = TOUCH_VOLT_LIM_H_1V7;
43
43
static touch_intr_trig_mode_t _intr_trig_mode = TOUCH_INTR_TRIG_ON_BELOW_THRESH ;
44
44
#elif SOC_TOUCH_SENSOR_VERSION == 2 // ESP32S2, ESP32S3
45
45
static uint8_t _sample_num = 1 ; // only one sample configuration supported
46
- static float _duration_ms = 500.0f ;
46
+ static uint32_t _chg_times = 500 ;
47
47
static touch_volt_lim_l_t _volt_low = TOUCH_VOLT_LIM_L_0V5 ;
48
48
static touch_volt_lim_h_t _volt_high = TOUCH_VOLT_LIM_H_2V2 ;
49
49
#elif SOC_TOUCH_SENSOR_VERSION == 3 // ESP32P4
@@ -225,7 +225,7 @@ static void __touchInit() {
225
225
#if SOC_TOUCH_SENSOR_VERSION == 1 // ESP32
226
226
touch_sensor_sample_config_t single_sample_cfg = TOUCH_SENSOR_V1_DEFAULT_SAMPLE_CONFIG (_duration_ms , _volt_low , _volt_high );
227
227
#elif SOC_TOUCH_SENSOR_VERSION == 2 // ESP32S2, ESP32S3
228
- touch_sensor_sample_config_t single_sample_cfg = TOUCH_SENSOR_V2_DEFAULT_SAMPLE_CONFIG (_duration_ms , _volt_low , _volt_high );
228
+ touch_sensor_sample_config_t single_sample_cfg = TOUCH_SENSOR_V2_DEFAULT_SAMPLE_CONFIG (_chg_times , _volt_low , _volt_high );
229
229
#elif SOC_TOUCH_SENSOR_VERSION == 3 // ESP32P4
230
230
touch_sensor_sample_config_t single_sample_cfg = TOUCH_SENSOR_V3_DEFAULT_SAMPLE_CONFIG (_div_num , _coarse_freq_tune , _fine_freq_tune );
231
231
#endif
You can’t perform that action at this time.
0 commit comments