Skip to content

Commit 47da2cc

Browse files
committedMar 17, 2025
feat(touch_proximity_sensor): refactor using esp_touch_fsm component
1 parent e780ae5 commit 47da2cc

16 files changed

+706
-716
lines changed
 

‎.gitlab/ci/build.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,7 @@ build_example_touch_touch_proximity:
723723
- .rules:build:example_touch_touch_proximity
724724
parallel:
725725
matrix:
726-
- IMAGE: espressif/idf:release-v5.0
727-
- IMAGE: espressif/idf:release-v5.1
728-
- IMAGE: espressif/idf:release-v5.2
726+
- IMAGE: espressif/idf:release-v5.3
729727
variables:
730728
EXAMPLE_DIR: examples/touch/touch_proximity
731729

@@ -1482,9 +1480,7 @@ build_components_touch_touch_proximity_sensor_test_apps:
14821480
- .rules:build:components_touch_touch_proximity_sensor_test_apps
14831481
parallel:
14841482
matrix:
1485-
- IMAGE: espressif/idf:release-v5.0
1486-
- IMAGE: espressif/idf:release-v5.1
1487-
- IMAGE: espressif/idf:release-v5.2
1483+
- IMAGE: espressif/idf:release-v5.3
14881484
variables:
14891485
EXAMPLE_DIR: components/touch/touch_proximity_sensor/test_apps
14901486

‎.gitlab/ci/target_test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ components_test_touch_proximity_sensor:
139139
optional: false
140140
parallel:
141141
matrix:
142-
- IDF_VERSION: ["5.0","5.1","5.2"]
142+
- IDF_VERSION: ["5.3"]
143143
IDF_TARGET: esp32s3
144144
ENV_TAG: "generic"
145145
tags:

‎components/touch/touch_proximity_sensor/CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# ChangeLog
22

3+
## v0.2.0 - 2025-1-20
4+
5+
### Break changes:
6+
7+
* Simplify the touch proximity sensor configs
8+
9+
### Enhancements:
10+
11+
* Refactor using esp_touch_fsm component
12+
313
## v0.1.2 - 2024-6-7
14+
415
* Add user debugging guide documentation for touch proximity sensor
516
* Change the parameter `response_ms` to `meas_count`
617

Original file line numberDiff line numberDiff line change
@@ -1,8 +1,78 @@
11
menu "Touch Proximity Sensor"
2-
config ENABLE_TOUCH_PROX_DEBUG
3-
bool "Enable touch proximity debug mode"
2+
3+
config TOUCH_PROXIMITY_SENSOR_DEBUG
4+
bool "Enable touch proximity sensor debug mode"
45
default n
56
help
6-
"If enable values and events will be printf during runtime"
7+
"Enable touch proximity sensor debug mode, plot sensor data using tptool"
8+
9+
config TOUCH_PROXIMITY_MEAS_COUNT
10+
int "Default measurement count"
11+
default 20
12+
range 10 100
13+
help
14+
"Number of measurements to accumulate for proximity detection"
15+
16+
config TOUCH_PROXIMITY_SMOOTH_COEF_X1000
17+
int "Smoothing coefficient (/1000)"
18+
default 700
19+
range 1 1000
20+
help
21+
"Coefficient for smoothing raw sensor readings. Actual value = configured/1000"
22+
23+
config TOUCH_PROXIMITY_BASELINE_COEF_X1000
24+
int "Baseline coefficient (/1000)"
25+
default 50
26+
range 1 1000
27+
help
28+
"Coefficient for baseline calculation. Actual value = configured/1000"
29+
30+
config TOUCH_PROXIMITY_MAX_P_X1000
31+
int "Maximum positive change rate (/1000)"
32+
default 500
33+
range 1 10000
34+
help
35+
"Maximum effective positive change rate. Actual value = configured/1000"
36+
37+
config TOUCH_PROXIMITY_MIN_N_X1000
38+
int "Minimum negative change rate (/1000)"
39+
default 50
40+
range 1 1000
41+
help
42+
"Minimum effective negative change rate. Actual value = configured/1000"
43+
44+
config TOUCH_PROXIMITY_NOISE_P_SNR
45+
int "Positive noise SNR"
46+
default 10
47+
range 2 100
48+
help
49+
"Positive noise signal-to-noise ratio"
50+
51+
config TOUCH_PROXIMITY_NOISE_N_SNR
52+
int "Negative noise SNR"
53+
default 5
54+
range 2 100
55+
help
56+
"Negative noise threshold"
57+
58+
config TOUCH_PROXIMITY_RESET_P
59+
int "Baseline reset positive debounce"
60+
default 0
61+
help
62+
"Threshold to reset baseline for positive changes, 0 to disable"
63+
64+
config TOUCH_PROXIMITY_RESET_N
65+
int "Baseline reset negative debounce"
66+
default 50
67+
range 10 1000
68+
help
69+
"Threshold to reset baseline for negative changes, 0 to disable"
70+
71+
config TOUCH_PROXIMITY_RAW_BUF_SIZE
72+
int "Raw data buffer size"
73+
default 20
74+
range 10 100
75+
help
76+
"Size of the buffer used to store raw sensor readings"
777

878
endmenu

‎components/touch/touch_proximity_sensor/idf_component.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
version: "0.1.2"
1+
version: "0.2.0"
22
targets:
33
- esp32s3
44
description: Touch proximity sensor component for ESP32-S3 (Experimental)
55
url: https://github.com/espressif/esp-iot-solution/tree/master/components/touch/touch_proximity_sensor
66
repository: https://github.com/espressif/esp-iot-solution.git
77
issues: https://github.com/espressif/esp-iot-solution/issues
88
dependencies:
9-
idf: ">=5.0"
10-
cmake_utilities: "0.*"
9+
idf: ">=5.3"
10+
cmake_utilities: "*"
11+
touch_sensor_fsm:
12+
version: "*"
13+
touch_sensor_lowlevel:
14+
version: "*"
1115
examples:
1216
- path: ../../../examples/touch/touch_proximity
1317
sbom:

‎components/touch/touch_proximity_sensor/include/touch_proximity_sensor.h

+59-62
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,43 @@
11
/*
2-
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
#pragma once
77
#include <stdio.h>
88
#include "driver/touch_pad.h"
9+
#include "esp_err.h"
910

10-
#define TOUCH_PROXIMITY_NUM_MAX SOC_TOUCH_PROXIMITY_CHANNEL_NUM
11-
11+
/**
12+
* @brief Touch Proximity Sensor State
13+
*/
1214
typedef enum {
13-
PROXI_EVT_INACTIVE = 0,
14-
PROXI_EVT_ACTIVE,
15-
} proxi_evt_t;
15+
PROXI_STATE_INACTIVE = 0,
16+
PROXI_STATE_ACTIVE,
17+
} proxi_state_t;
1618

1719
/**
1820
* @brief Configuration structure for touch proximity sensor
19-
*
20-
* This structure defines the configuration parameters for a touch proximity sensor.
21-
*
2221
*/
2322
typedef struct {
2423
uint32_t channel_num; /*!< Number of touch proximity sensor channels */
25-
uint32_t channel_list[TOUCH_PROXIMITY_NUM_MAX]; /*!< Touch proximity sensor channel list */
26-
uint32_t meas_count; /*!< Accumulated measurement count */
27-
float smooth_coef; /*!< Smoothing coefficient */
28-
float baseline_coef; /*!< Baseline coefficient */
29-
float max_p; /*!< Maximum effective positive change rate */
30-
float min_n; /*!< Minimum effective negative change rate */
31-
float threshold_p[TOUCH_PROXIMITY_NUM_MAX]; /*!< Positive threshold */
32-
float threshold_n[TOUCH_PROXIMITY_NUM_MAX]; /*!< Negative threshold */
33-
float hysteresis_p; /*!< Hysteresis for positive threshold */
34-
float noise_p; /*!< Positive noise threshold */
35-
float noise_n; /*!< Negative noise threshold */
36-
uint32_t debounce_p; /*!< Debounce times for positive threshold */
37-
uint32_t debounce_n; /*!< Debounce times for negative threshold */
38-
uint32_t reset_p; /*!< Baseline reset positive threshold*/
39-
uint32_t reset_n; /*!< Baseline reset negative threshold*/
40-
uint32_t gold_value[TOUCH_PROXIMITY_NUM_MAX]; /*!< Gold value */
41-
} proxi_config_t;
24+
uint32_t *channel_list; /*!< Touch channel list */
25+
float *channel_threshold; /*!< Threshold for touch detection for each channel */
26+
uint32_t debounce_times; /*!< Number of consecutive readings needed to confirm state change */
27+
uint32_t *channel_gold_value; /*!< Reference values for touch channels */
28+
bool skip_lowlevel_init; /*!< Skip low level initialization when working with existing touch driver */
29+
} touch_proxi_config_t;
4230

4331
typedef struct touch_proximity_sensor_t *touch_proximity_handle_t;
4432

45-
#define DEFAULTS_PROX_CONFIGS()\
46-
{\
47-
.meas_count = 50,\
48-
.smooth_coef = 0.2,\
49-
.baseline_coef = 0.1,\
50-
.max_p = 0.2,\
51-
.min_n = 0.08,\
52-
.threshold_n[0] = 0.002,\
53-
.hysteresis_p = 0.2,\
54-
.noise_p = 0.001,\
55-
.noise_n = 0.001,\
56-
.debounce_p = 2,\
57-
.debounce_n = 1,\
58-
.reset_p = 1000,\
59-
.reset_n = 3,\
60-
}
61-
6233
#ifdef __cplusplus
6334
extern "C" {
6435
#endif
6536

6637
/**
6738
* proximity sensor user callback type
6839
*/
69-
typedef void(*proxi_cb_t)(uint32_t channel, proxi_evt_t event, void *cb_arg);
40+
typedef void(*proxi_cb_t)(uint32_t channel, proxi_state_t event, void *cb_arg);
7041

7142
/**
7243
* @brief Create a touch proximity sensor instance.
@@ -79,42 +50,68 @@ typedef void(*proxi_cb_t)(uint32_t channel, proxi_evt_t event, void *cb_arg);
7950
* - ESP_OK: Create the touch proximity sensor successfully.
8051
* - ESP_ERR_NO_MEM: Failed to create the touch proximity sensor (memory allocation failed).
8152
*/
82-
esp_err_t touch_proximity_sensor_create(proxi_config_t *config, touch_proximity_handle_t *sensor_handle, proxi_cb_t cb, void *cb_arg);
53+
esp_err_t touch_proximity_sensor_create(touch_proxi_config_t *config, touch_proximity_handle_t *sensor_handle, proxi_cb_t cb, void *cb_arg);
54+
55+
/**
56+
* @brief Delete the touch proximity sensor instance.
57+
*
58+
* This function deletes the touch proximity sensor instance associated with the provided sensor handle.
59+
*
60+
* @param proxi_sensor Pointer to the handle of the touch proximity sensor instance to be deleted.
61+
* @return
62+
* - ESP_OK: Delete the touch proximity sensor instance successfully
63+
*/
64+
esp_err_t touch_proximity_sensor_delete(touch_proximity_handle_t proxi_sensor);
8365

8466
/**
85-
* @brief Start the touch proximity sensor.
67+
* @brief Get touch proximity sensor data
68+
*
69+
* Retrieves the smoothed touch sensor reading from the specified channel.
8670
*
87-
* This function starts the touch proximity sensor operation.
71+
* @param[in] handle Touch proximity sensor handle
72+
* @param[in] channel Touch channel number
73+
* @param[out] data Pointer to store the smoothed touch sensor data
8874
*
89-
* @param proxi_sensor Pointer to the handle of the touch proximity sensor instance.
9075
* @return
91-
* - ESP_OK: Start the touch proximity sensor successfully
92-
* - ESP_ERR_INVALID_ARG: The touch proximity sensor failed to start (touch_proximity_handle_t is NULL, or channel_num is zero).
93-
* - ESP_FAIL: The touch proximity sensor failed to start (failed to create queue for touch pad).
76+
* - ESP_OK on success
77+
* - ESP_ERR_INVALID_ARG if handle or data is NULL
78+
* - ESP_ERR_INVALID_STATE if sensor not initialized
79+
* - ESP_ERR_NOT_FOUND if channel not found
9480
*/
95-
esp_err_t touch_proximity_sensor_start(touch_proximity_handle_t proxi_sensor);
81+
esp_err_t touch_proximity_sensor_get_data(touch_proximity_handle_t handle, uint32_t channel, uint32_t *data);
9682

9783
/**
98-
* @brief Stop the touch proximity sensor.
84+
* @brief Get current state of a proximity channel
85+
*
86+
* Returns whether the proximity channel is currently considered active (object detected)
87+
* based on the current sensor readings and configured thresholds.
9988
*
100-
* This function stops the operation of the touch proximity sensor associated with the provided sensor handle.
89+
* @param[in] handle Touch proximity sensor handle
90+
* @param[in] channel Touch channel number
91+
* @param[out] state Pointer to store the channel state
10192
*
102-
* @param proxi_sensor Pointer to the handle of the touch proximity sensor instance.
10393
* @return
104-
* - ESP_OK: Stop the touch proximity sensor successfully
94+
* - ESP_OK on success
95+
* - ESP_ERR_INVALID_ARG if handle or state is NULL
96+
* - ESP_ERR_INVALID_STATE if sensor not initialized
97+
* - ESP_ERR_NOT_FOUND if channel not found
10598
*/
106-
esp_err_t touch_proximity_sensor_stop(touch_proximity_handle_t proxi_sensor);
99+
esp_err_t touch_proximity_sensor_get_state(touch_proximity_handle_t handle, uint32_t channel, proxi_state_t *state);
107100

108101
/**
109-
* @brief Delete the touch proximity sensor instance.
102+
* @brief Handle pending proximity sensor events
110103
*
111-
* This function deletes the touch proximity sensor instance associated with the provided sensor handle.
104+
* Processes events from the FSM. This function should be called
105+
* periodically to update proximity states and trigger callbacks.
106+
*
107+
* @param[in] handle Touch proximity sensor handle
112108
*
113-
* @param proxi_sensor Pointer to the handle of the touch proximity sensor instance to be deleted.
114109
* @return
115-
* - ESP_OK: Delete the touch proximity sensor instance successfully
110+
* - ESP_OK on success
111+
* - ESP_ERR_INVALID_ARG if handle is NULL
112+
* - ESP_ERR_INVALID_STATE if sensor not initialized
116113
*/
117-
esp_err_t touch_proximity_sensor_delete(touch_proximity_handle_t proxi_sensor);
114+
esp_err_t touch_proximity_sensor_handle_events(touch_proximity_handle_t handle);
118115

119116
#ifdef __cplusplus
120117
}

‎components/touch/touch_proximity_sensor/test_apps/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# in this exact order for cmake to work correctly
33
cmake_minimum_required(VERSION 3.5)
44

5-
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components"
6-
"../../touch_proximity_sensor")
5+
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
6+
77
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
88
project(touch_proximity_sensor_test)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
idf: ">=5.3"
3+
touch_sensor_lowlevel:
4+
version: "*"
5+
touch_proximity_sensor:
6+
override_path: "../../../touch_proximity_sensor"

‎components/touch/touch_proximity_sensor/test_apps/main/touch_proximity_sensor_test.c

+131-87
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -8,125 +8,169 @@
88
#include <stdlib.h>
99
#include "freertos/FreeRTOS.h"
1010
#include "freertos/task.h"
11-
#include "driver/ledc.h"
1211
#include "esp_log.h"
1312
#include "unity.h"
13+
#include "touch_sensor_lowlevel.h"
1414
#include "touch_proximity_sensor.h"
1515

1616
const static char *TAG = "touch-proximity-sensor-test";
1717

1818
#define TEST_MEMORY_LEAK_THRESHOLD (-200)
19-
#define IO_BUZZER_CTRL 36
20-
#define LEDC_LS_TIMER LEDC_TIMER_1
21-
#define LEDC_LS_CH0_CHANNEL LEDC_CHANNEL_0
22-
#define LEDC_LS_MODE LEDC_LOW_SPEED_MODE
2319

24-
static bool s_buzzer_driver_installed = false;
2520
static touch_proximity_handle_t s_touch_proximity_sensor = NULL;
2621

2722
static size_t before_free_8bit;
2823
static size_t before_free_32bit;
2924

30-
static esp_err_t buzzer_driver_install(gpio_num_t buzzer_pin)
31-
{
32-
ledc_timer_config_t ledc_timer = {
33-
.duty_resolution = LEDC_TIMER_13_BIT, //Resolution of PWM duty
34-
.freq_hz = 5000, //Frequency of PWM signal
35-
.speed_mode = LEDC_LS_MODE, //Timer mode
36-
.timer_num = LEDC_LS_TIMER, //Timer index
37-
.clk_cfg = LEDC_AUTO_CLK, //Auto select the source clock (REF_TICK or APB_CLK or RTC_8M_CLK)
38-
};
39-
TEST_ESP_OK(ledc_timer_config(&ledc_timer));
40-
ledc_channel_config_t ledc_channel = {
41-
.channel = LEDC_LS_CH0_CHANNEL,
42-
.duty = 4096,
43-
.gpio_num = buzzer_pin,
44-
.speed_mode = LEDC_LS_MODE,
45-
.hpoint = 0,
46-
.timer_sel = LEDC_LS_TIMER //Let timer associate with LEDC channel (Timer1)
47-
};
48-
TEST_ESP_OK(ledc_channel_config(&ledc_channel));
49-
TEST_ESP_OK(ledc_fade_func_install(0));
50-
TEST_ESP_OK(ledc_set_duty(ledc_channel.speed_mode, ledc_channel.channel, 0));
51-
TEST_ESP_OK(ledc_update_duty(ledc_channel.speed_mode, ledc_channel.channel));
52-
return ESP_OK;
53-
}
54-
55-
static void buzzer_set_voice(bool en)
56-
{
57-
uint32_t freq = en ? 5000 : 0;
58-
ledc_set_duty(LEDC_LS_MODE, LEDC_LS_CH0_CHANNEL, freq);
59-
ledc_update_duty(LEDC_LS_MODE, LEDC_LS_CH0_CHANNEL);
60-
}
61-
62-
static void example_proxi_callback(uint32_t channel, proxi_evt_t event, void *cb_arg)
25+
static void example_proxi_callback(uint32_t channel, proxi_state_t event, void *cb_arg)
6326
{
6427
switch (event) {
65-
case PROXI_EVT_ACTIVE:
66-
buzzer_set_voice(1);
28+
case PROXI_STATE_ACTIVE:
6729
ESP_LOGI(TAG, "CH%"PRIu32", active!", channel);
6830
break;
69-
case PROXI_EVT_INACTIVE:
70-
buzzer_set_voice(0);
31+
case PROXI_STATE_INACTIVE:
7132
ESP_LOGI(TAG, "CH%"PRIu32", inactive!", channel);
7233
break;
7334
default:
7435
break;
7536
}
7637
}
7738

78-
TEST_CASE("touch proximity sensor APIs test", "[touch_proximity_sensor][API]")
39+
TEST_CASE("touch proximity sensor loop get test", "[touch_proximity_sensor][loop]")
7940
{
80-
proxi_config_t config = (proxi_config_t)DEFAULTS_PROX_CONFIGS();
81-
config.channel_num = 1;
82-
config.meas_count = 50;
83-
config.channel_list[0] = TOUCH_PAD_NUM8;
84-
config.threshold_p[0] = 0.004;
85-
config.threshold_n[0] = 0.004;
86-
config.noise_p = 0.001;
87-
config.debounce_p = 1;
88-
esp_err_t ret = touch_proximity_sensor_create(&config, &s_touch_proximity_sensor, &example_proxi_callback, NULL);
89-
if (ret != ESP_OK) {
90-
ESP_LOGE(TAG, "touch proximity sense create failed");
41+
uint32_t channel_list[] = {TOUCH_PAD_NUM8};
42+
float channel_threshold[] = {0.004f};
43+
touch_proxi_config_t config = {
44+
.channel_num = 1,
45+
.channel_list = channel_list,
46+
.channel_threshold = channel_threshold,
47+
.debounce_times = 2,
48+
.skip_lowlevel_init = false,
49+
};
50+
51+
// Test create
52+
TEST_ESP_OK(touch_proximity_sensor_create(&config, &s_touch_proximity_sensor, NULL, NULL));
53+
TEST_ASSERT_NOT_NULL(s_touch_proximity_sensor);
54+
55+
int counter = 0;
56+
while (counter++ < 100) {
57+
uint32_t data;
58+
proxi_state_t state;
59+
TEST_ESP_OK(touch_proximity_sensor_handle_events(s_touch_proximity_sensor));
60+
TEST_ESP_OK(touch_proximity_sensor_get_state(s_touch_proximity_sensor, TOUCH_PAD_NUM8, &state));
61+
TEST_ESP_OK(touch_proximity_sensor_get_data(s_touch_proximity_sensor, TOUCH_PAD_NUM8, &data));
62+
printf("CH%d, state: %d, data: %"PRIu32"\n", TOUCH_PAD_NUM8, state, data);
63+
vTaskDelay(20 / portTICK_PERIOD_MS);
9164
}
92-
touch_proximity_sensor_start(s_touch_proximity_sensor);
93-
vTaskDelay(300 / portTICK_PERIOD_MS);
94-
touch_proximity_sensor_stop(s_touch_proximity_sensor);
95-
vTaskDelay(200 / portTICK_PERIOD_MS);
96-
touch_proximity_sensor_delete(s_touch_proximity_sensor);
65+
66+
// Test delete
67+
TEST_ESP_OK(touch_proximity_sensor_delete(s_touch_proximity_sensor));
68+
s_touch_proximity_sensor = NULL;
9769
}
9870

99-
TEST_CASE("touch proximity sensor create & start test", "[ignore][touch_proximity_sensor][create & start]")
71+
TEST_CASE("touch proximity sensor callback test", "[touch_proximity_sensor][callback]")
10072
{
101-
if (s_buzzer_driver_installed == false) {
102-
if (buzzer_driver_install(IO_BUZZER_CTRL) == ESP_OK) {
103-
s_buzzer_driver_installed = true;
104-
} else {
105-
ESP_LOGW(TAG, "Buzzer driver install failed, skipping test");
106-
}
107-
}
108-
proxi_config_t config = (proxi_config_t)DEFAULTS_PROX_CONFIGS();
109-
config.channel_num = 1;
110-
config.meas_count = 50;
111-
config.channel_list[0] = TOUCH_PAD_NUM8;
112-
config.threshold_p[0] = 0.004;
113-
config.threshold_n[0] = 0.004;
114-
config.noise_p = 0.001;
115-
config.debounce_p = 1;
116-
esp_err_t ret = touch_proximity_sensor_create(&config, &s_touch_proximity_sensor, &example_proxi_callback, NULL);
117-
if (ret != ESP_OK) {
118-
ESP_LOGE(TAG, "touch proximity sense create failed");
73+
uint32_t channel_list[] = {TOUCH_PAD_NUM8};
74+
float channel_threshold[] = {0.004f};
75+
touch_proxi_config_t config = {
76+
.channel_num = 1,
77+
.channel_list = channel_list,
78+
.channel_threshold = channel_threshold,
79+
.debounce_times = 2,
80+
.skip_lowlevel_init = false,
81+
};
82+
83+
TEST_ESP_OK(touch_proximity_sensor_create(&config, &s_touch_proximity_sensor, &example_proxi_callback, NULL));
84+
85+
ESP_LOGI(TAG, "touch proximity sensor started - approach the touch pad to test proximity detection");
86+
for (int i = 0; i < 100; i++) {
87+
touch_proximity_sensor_handle_events(s_touch_proximity_sensor);
88+
vTaskDelay(20 / portTICK_PERIOD_MS);
11989
}
120-
touch_proximity_sensor_start(s_touch_proximity_sensor);
121-
vTaskDelay(200 / portTICK_PERIOD_MS);
122-
ESP_LOGI(TAG, "touch proximity sensor has started! when you approach the touch sub-board, the buzzer will sound.");
90+
91+
TEST_ESP_OK(touch_proximity_sensor_delete(s_touch_proximity_sensor));
92+
s_touch_proximity_sensor = NULL;
12393
}
12494

125-
TEST_CASE("touch proximity sensor stop & delete test", "[ignore][touch_proximity_sensor][stop & delete]")
95+
TEST_CASE("touch proximity sensor skip lowlevel init", "[touch_proximity_sensor][loop]")
12696
{
127-
touch_proximity_sensor_stop(s_touch_proximity_sensor);
128-
vTaskDelay(200 / portTICK_PERIOD_MS);
129-
touch_proximity_sensor_delete(s_touch_proximity_sensor);
97+
// First initialize the low level touch sensor
98+
uint32_t channel_list[] = {TOUCH_PAD_NUM8};
99+
touch_lowlevel_type_t channel_type[] = {TOUCH_LOWLEVEL_TYPE_PROXIMITY};
100+
touch_lowlevel_config_t low_config = {
101+
.channel_num = 1,
102+
.channel_list = channel_list,
103+
.channel_type = channel_type,
104+
.proximity_count = CONFIG_TOUCH_PROXIMITY_MEAS_COUNT,
105+
};
106+
TEST_ESP_OK(touch_sensor_lowlevel_create(&low_config));
107+
108+
// Now create two proximity sensors that use the same touch hardware
109+
touch_proximity_handle_t sensor1 = NULL;
110+
touch_proximity_handle_t sensor2 = NULL;
111+
112+
float threshold1[] = {0.008f};
113+
float threshold2[] = {0.01f}; // Different threshold for testing
114+
115+
// Configure first sensor
116+
touch_proxi_config_t config1 = {
117+
.channel_num = 1,
118+
.channel_list = channel_list,
119+
.channel_threshold = threshold1,
120+
.debounce_times = 2,
121+
.skip_lowlevel_init = true, // Skip since we already initialized
122+
};
123+
124+
// Configure second sensor
125+
touch_proxi_config_t config2 = {
126+
.channel_num = 1,
127+
.channel_list = channel_list,
128+
.channel_threshold = threshold2,
129+
.debounce_times = 3, // Different debounce for testing
130+
.skip_lowlevel_init = true,
131+
};
132+
133+
// Create both sensors
134+
TEST_ESP_OK(touch_proximity_sensor_create(&config1, &sensor1, NULL, NULL));
135+
TEST_ESP_OK(touch_proximity_sensor_create(&config2, &sensor2, NULL, NULL));
136+
TEST_ASSERT_NOT_NULL(sensor1);
137+
TEST_ASSERT_NOT_NULL(sensor2);
138+
TEST_ESP_OK(touch_sensor_lowlevel_start());
139+
140+
// Test both sensors for a while
141+
for (int i = 0; i < 100; i++) {
142+
uint32_t data1, data2;
143+
proxi_state_t state1, state2;
144+
145+
// Handle events and get data from both sensors
146+
TEST_ESP_OK(touch_proximity_sensor_handle_events(sensor1));
147+
TEST_ESP_OK(touch_proximity_sensor_handle_events(sensor2));
148+
149+
// Get data from both sensors
150+
TEST_ESP_OK(touch_proximity_sensor_get_data(sensor1, TOUCH_PAD_NUM8, &data1));
151+
TEST_ESP_OK(touch_proximity_sensor_get_data(sensor2, TOUCH_PAD_NUM8, &data2));
152+
153+
// Get states from both sensors
154+
TEST_ESP_OK(touch_proximity_sensor_get_state(sensor1, TOUCH_PAD_NUM8, &state1));
155+
TEST_ESP_OK(touch_proximity_sensor_get_state(sensor2, TOUCH_PAD_NUM8, &state2));
156+
157+
// Both sensors should get similar raw data since they use the same hardware
158+
TEST_ASSERT_UINT32_WITHIN(100, data1, data2);
159+
160+
// States might differ due to different thresholds and debounce settings
161+
printf("Sensor1: data=%"PRIu32", state=%d; Sensor2: data=%"PRIu32", state=%d\n",
162+
data1, state1, data2, state2);
163+
164+
vTaskDelay(20 / portTICK_PERIOD_MS);
165+
}
166+
167+
// Clean up in reverse order
168+
TEST_ESP_OK(touch_proximity_sensor_delete(sensor2));
169+
TEST_ESP_OK(touch_proximity_sensor_delete(sensor1));
170+
171+
// Finally clean up the low level touch sensor
172+
TEST_ESP_OK(touch_sensor_lowlevel_stop());
173+
TEST_ESP_OK(touch_sensor_lowlevel_delete());
130174
}
131175

132176
static void check_leak(size_t before_free, size_t after_free, const char *type)

‎components/touch/touch_proximity_sensor/touch_proximity_sensor.c

+201-273
Large diffs are not rendered by default.

‎docs/en/touch/touch_proximity_sensor.rst

+86-123
Large diffs are not rendered by default.

‎docs/zh_CN/touch/touch_proximity_sensor.rst

+87-124
Original file line numberDiff line numberDiff line change
@@ -41,102 +41,69 @@
4141
------------
4242

4343
创建接近感应传感器
44-
^^^^^^^^^^^^^^^^^^^^^^^^
44+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4545

46-
使用 ``touch_proximity_sensor`` 组件,可通过 :cpp:type:`proxi_config_t` 结构体来配置接近感应传感器。
46+
使用 ``touch_proximity_sensor`` 组件,可通过 :cpp:type:`touch_proxi_config_t` 结构体来配置接近感应传感器。
4747

4848
.. code:: c
4949
50-
// Configuration structure for touch proximity sensor
5150
typedef struct {
52-
uint32_t channel_num;
53-
uint32_t channel_list[TOUCH_PROXIMITY_NUM_MAX];
54-
uint32_t meas_count;
55-
float smooth_coef;
56-
float baseline_coef;
57-
float max_p;
58-
float min_n;
59-
float threshold_p[TOUCH_PROXIMITY_NUM_MAX];
60-
float threshold_n[TOUCH_PROXIMITY_NUM_MAX];
61-
float hysteresis_p;
62-
float noise_p;
63-
float noise_n;
64-
uint32_t debounce_p;
65-
uint32_t debounce_n;
66-
uint32_t reset_p;
67-
uint32_t reset_n;
68-
uint32_t gold_value[TOUCH_PROXIMITY_NUM_MAX];
69-
} proxi_config_t;
70-
71-
具体参数说明如下:
72-
73-
+----------------+------------------------------------------------------------------+
74-
| 配置参数 | 说明 |
75-
+================+==================================================================+
76-
| channel_num | 触摸接近感应通道数量,最多支持 3 个 |
77-
+----------------+------------------------------------------------------------------+
78-
| channel_list | 触摸接近感应通道列表,即触摸通道 |
79-
+----------------+------------------------------------------------------------------+
80-
| meas_count | 接近感应通道的累计测量次数,值越大,数据更新越慢 |
81-
+----------------+------------------------------------------------------------------+
82-
| smooth_coef | 数据平滑处理系数,降低数据波动 |
83-
+----------------+------------------------------------------------------------------+
84-
| baseline_coef | 基线系数,确定基线调整的速率,用于消除环境变化的影响 |
85-
+----------------+------------------------------------------------------------------+
86-
| max_p | 最大有效正变化率 |
87-
+----------------+------------------------------------------------------------------+
88-
| min_n | 最小有效负变化率 |
89-
+----------------+------------------------------------------------------------------+
90-
| threshold_p | 正向触发阈值 |
91-
+----------------+------------------------------------------------------------------+
92-
| threshold_n | 负向触发阈值 |
93-
+----------------+------------------------------------------------------------------+
94-
| hysteresis_p | 正阈值迟滞系数,在触发和解除触发之间提供缓冲区,以防止连续误触发 |
95-
+----------------+------------------------------------------------------------------+
96-
| noise_p | 正噪声阈值,基线更新与该值有关 |
97-
+----------------+------------------------------------------------------------------+
98-
| noise_n | 负噪声阈值,基线更新与该值有关 |
99-
+----------------+------------------------------------------------------------------+
100-
| debounce_p | 正阈值的去抖动次数,以减少误触发 |
101-
+----------------+------------------------------------------------------------------+
102-
| debounce_n | 负阈值的去抖动次数,以减少误解除触发 |
103-
+----------------+------------------------------------------------------------------+
104-
| reset_p | 触发基线重置的正向阈值 |
105-
+----------------+------------------------------------------------------------------+
106-
| reset_n | 触发基线重置的负向阈值 |
107-
+----------------+------------------------------------------------------------------+
108-
| gold_value | 金标准值,用于在特殊情况下恢复正常值 |
109-
+----------------+------------------------------------------------------------------+
110-
111-
然后使用 :cpp:func:`touch_proximity_sensor_create` 配置并创建接近感应传感器对象。
51+
uint32_t channel_num; /*!< 触摸接近感应通道数量 */
52+
uint32_t *channel_list; /*!< 触摸通道列表 */
53+
float *channel_threshold; /*!< 每个通道的触发阈值 */
54+
uint32_t debounce_times; /*!< 确认状态改变所需的连续读数次数 */
55+
uint32_t *channel_gold_value; /*!< 触摸通道参考值 */
56+
bool skip_lowlevel_init; /*!< 使用现有触摸驱动时跳过低级初始化 */
57+
} touch_proxi_config_t;
58+
59+
主要参数说明:
60+
61+
+--------------------+-------------------------------------+
62+
| 参数 | 说明 |
63+
+====================+=====================================+
64+
| channel_num | 触摸接近感应通道数量,最多支持 3 个 |
65+
+--------------------+-------------------------------------+
66+
| channel_list | 触摸通道列表 |
67+
+--------------------+-------------------------------------+
68+
| channel_threshold | 每个通道的触发阈值数组 |
69+
+--------------------+-------------------------------------+
70+
| debounce_times | 确认状态改变所需的连续读数次数 |
71+
+--------------------+-------------------------------------+
72+
| channel_gold_value | 可选的触摸通道参考值 |
73+
+--------------------+-------------------------------------+
74+
| skip_lowlevel_init | 使用现有触摸驱动时跳过低级初始化 |
75+
+--------------------+-------------------------------------+
76+
77+
配置参数后,使用 :cpp:func:`touch_proximity_sensor_create` 创建接近感应传感器:
11278

11379
.. code:: c
11480
115-
proxi_config_t config = (proxi_config_t)DEFAULTS_PROX_CONFIGS();
116-
esp_err_t ret = touch_proximity_sensor_create(&config, &s_touch_proximity_sensor, &example_proxi_callback, NULL);
117-
if (ret != ESP_OK) {
118-
ESP_LOGE(TAG, "touch proximity sense create failed");
119-
}
120-
121-
其中, `s_touch_proximity_sensor` 为触摸接近感应传感器句柄, `example_proxi_callback` 为接近感应传感器事件回调函数。
122-
123-
启动和停止接近感应传感器
124-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125-
使用 :cpp:func:`touch_proximity_sensor_start` 启动接近感应传感器:
126-
127-
.. code:: c
81+
touch_proxi_config_t config = {
82+
.channel_num = 1,
83+
.channel_list = channel_list,
84+
.channel_threshold = channel_threshold,
85+
.debounce_times = 2,
86+
};
87+
88+
esp_err_t ret = touch_proximity_sensor_create(&config, &sensor_handle, callback_func, NULL);
12889
129-
// Start the touch proximity sensor
130-
touch_proximity_sensor_start(s_touch_proximity_sensor);
90+
事件处理
91+
^^^^^^^^^^^^^^^^^^^^^
13192

132-
使用 :cpp:func:`touch_proximity_sensor_stop` 停止接近感应传感器
93+
接近感应传感器需要定期处理事件以更新状态和触发回调。这可以在任务中完成
13394

13495
.. code:: c
13596
136-
// Stop the touch proximity sensor
137-
touch_proximity_sensor_stop(s_touch_proximity_sensor);
97+
void proximity_task(void *arg)
98+
{
99+
while (1) {
100+
touch_proximity_sensor_handle_events(sensor_handle);
101+
vTaskDelay(pdMS_TO_TICKS(20));
102+
}
103+
}
138104
139-
.. Note:: 接近感应传感器的启动和停止过程需要一定时间才能完成,因此,在调用启动和停止 API 之后,添加等待时间是有必要的,通常,启动时间为 300 ms,停止过程需 200 ms,详情请参考示例程序。
105+
// 创建任务
106+
xTaskCreate(proximity_task, "proximity_task", 2048, NULL, 5, NULL);
140107
141108
删除接近感应传感器
142109
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,62 +112,58 @@
145112
.. code:: c
146113
147114
// Delete the touch proximity sensor
148-
touch_proximity_sensor_delete(s_touch_proximity_sensor);
115+
touch_proximity_sensor_delete(sensor_handle);
149116
150117
参数调节参考
151118
------------------
152119

153120
* channel_num 最大为 3。
154121
* channel_list 数组必须赋值为 `touch_pad_t` 枚举变量中的值。
155-
* meas_count 数值越大,触摸传感器新数据的更新速率越慢。
156-
* smooth_coef 是数据平滑处理系数,平滑后的 `smooth` 值等于 `smooth * (1.0 - smooth_coef) + raw * smooth_coef`, `smooth_coef` 数值越大, `raw` 的权重就越大,平滑效果越差, `smooth` 波形越抖, `smooth` 跟随 `raw` 值速度越快,触发响应越快,抗干扰能力越弱; `smooth_coef` 数值越小, `raw` 的权重就越小,平滑效果越好, `smooth` 波形越平滑, `smooth` 跟随 `raw` 值速度越慢,触发响应越慢,抗干扰能力越强。
157-
* baseline_coef 是基线更新系数,基线新值等于 `baseline * (1.0 - baseline_coef) + smooth * baseline_coef`,该值越大,基线跟随 `smooth` 速度越快,触发响应越慢,抗干扰能力越强。
158-
* max_p 当 `raw - baseline` 的值大于 `baseline * max_p` 时, `raw` 值为异常值,忽略掉。
159-
* min_n 当 `baseline - raw` 的值大于 `baseline * min_n` 时, `raw` 值为异常值,忽略掉。
122+
* meas_count 默认值为 20,数值越大,触摸传感器新数据的更新速率越慢。
123+
* smooth_coef 默认值为 0.7,是数据平滑处理系数,平滑后的 `smooth` 值等于 `smooth * (1.0 - smooth_coef) + raw * smooth_coef`, `smooth_coef` 数值越大, `raw` 的权重就越大,平滑效果越差, `smooth` 波形越抖, `smooth` 跟随 `raw` 值速度越快,触发响应越快,抗干扰能力越弱; `smooth_coef` 数值越小, `raw` 的权重就越小,平滑效果越好, `smooth` 波形越平滑, `smooth` 跟随 `raw` 值速度越慢,触发响应越慢,抗干扰能力越强。
124+
* baseline_coef 默认值为 0.05,是基线更新系数,基线新值等于 `baseline * (1.0 - baseline_coef) + smooth * baseline_coef`,该值越大,基线跟随 `smooth` 速度越快,触发响应越慢,抗干扰能力越强。
125+
* max_p 默认值为 0.5,当 `raw - baseline` 的值大于 `baseline * max_p` 时, `raw` 值为异常值,忽略掉。
126+
* min_n 默认值为 0.05,当 `baseline - raw` 的值大于 `baseline * min_n` 时, `raw` 值为异常值,忽略掉。
160127
* threshold_p 值越大,接近感应触发的距离越近,抗干扰能力越强,反之相反。
161128
* threshold_n 值越大,接近感应触发的距离越近,抗干扰能力越强,反之相反。
162-
* noise_p 和 noise_n 的值越大,基线更容易跟随 `smooth`,接近感应距离会相应变小,抗干扰能力越好。
129+
* noise_p 默认值为 0.1,和 noise_n 默认值为 0.2,的值越大,基线更容易跟随 `smooth`,接近感应距离会相应变小,抗干扰能力越好。
163130
* debounce_p 和 debounce_n 的值需要参考 `meas_count` 的值进行调整, `meas_count` 越小, `debounce_p` 和 `debounce_n` 应相应增大,以提高抗干扰能力。
131+
* reset_p 默认值为 0,用于基线重置正向去抖动,设置为 0 表示禁用。
132+
* reset_n 默认值为 50,用于基线重置负向去抖动。
164133

165134
调参波形对比
166135
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
167136
默认的触摸接近感应传感器配置参数如下:
168137

169-
+----------------+----------------+
170-
| 参数 | 默认值 |
171-
+================+================+
172-
| channel_num | 1 |
173-
+----------------+----------------+
174-
| channel_list | TOUCH_PAD_NUM8 |
175-
+----------------+----------------+
176-
| meas_count | 50 |
177-
+----------------+----------------+
178-
| smooth_coef | 0.2 |
179-
+----------------+----------------+
180-
| baseline_coef | 0.1 |
181-
+----------------+----------------+
182-
| max_p | 0.2 |
183-
+----------------+----------------+
184-
| min_n | 0.08 |
185-
+----------------+----------------+
186-
| threshold_p | 0.002 |
187-
+----------------+----------------+
188-
| threshold_n | 0.002 |
189-
+----------------+----------------+
190-
| hysteresis_p | 0.2 |
191-
+----------------+----------------+
192-
| noise_p | 0.001 |
193-
+----------------+----------------+
194-
| noise_n | 0.001 |
195-
+----------------+----------------+
196-
| debounce_p | 2 |
197-
+----------------+----------------+
198-
| debounce_n | 1 |
199-
+----------------+----------------+
200-
| reset_p | 1000 |
201-
+----------------+----------------+
202-
| reset_n | 3 |
203-
+----------------+----------------+
138+
+---------------+----------------+
139+
| 参数 | 默认值 |
140+
+===============+================+
141+
| channel_num | 1 |
142+
+---------------+----------------+
143+
| channel_list | TOUCH_PAD_NUM8 |
144+
+---------------+----------------+
145+
| meas_count | 20 |
146+
+---------------+----------------+
147+
| smooth_coef | 0.7 |
148+
+---------------+----------------+
149+
| baseline_coef | 0.05 |
150+
+---------------+----------------+
151+
| max_p | 0.5 |
152+
+---------------+----------------+
153+
| min_n | 0.05 |
154+
+---------------+----------------+
155+
| noise_p | 0.1 |
156+
+---------------+----------------+
157+
| noise_n | 0.2 |
158+
+---------------+----------------+
159+
| debounce_p | 2 |
160+
+---------------+----------------+
161+
| debounce_n | 50 |
162+
+---------------+----------------+
163+
| reset_p | 0 |
164+
+---------------+----------------+
165+
| reset_n | 50 |
166+
+---------------+----------------+
204167

205168
以下调参对比都将在以上参数基础上 **仅修改一个参数** 进行对比。
206169

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
dependencies:
2-
idf: ">=5.0"
2+
idf: ">=5.3"
33
touch_proximity_sensor:
44
override_path: "../../../../components/touch/touch_proximity_sensor"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -12,20 +12,18 @@
1212
#include "touch_proximity_sensor.h"
1313
#include "buzzer.h"
1414

15-
const static char *TAG = "touch-prox-example";
16-
17-
#define IO_BUZZER_CTRL 36
18-
15+
static const char *TAG = "touch-prox-example";
1916
static touch_proximity_handle_t s_touch_proximity_sensor = NULL;
17+
#define IO_BUZZER_CTRL 36
2018

21-
void example_proxi_callback(uint32_t channel, proxi_evt_t event, void *cb_arg)
19+
void example_proxi_callback(uint32_t channel, proxi_state_t event, void *cb_arg)
2220
{
2321
switch (event) {
24-
case PROXI_EVT_ACTIVE:
22+
case PROXI_STATE_ACTIVE:
2523
buzzer_set_voice(1);
2624
ESP_LOGI(TAG, "CH%"PRIu32", active!", channel);
2725
break;
28-
case PROXI_EVT_INACTIVE:
26+
case PROXI_STATE_INACTIVE:
2927
buzzer_set_voice(0);
3028
ESP_LOGI(TAG, "CH%"PRIu32", inactive!", channel);
3129
break;
@@ -34,31 +32,38 @@ void example_proxi_callback(uint32_t channel, proxi_evt_t event, void *cb_arg)
3432
}
3533
}
3634

35+
static void proximity_task(void *arg)
36+
{
37+
while (1) {
38+
touch_proximity_sensor_handle_events(s_touch_proximity_sensor);
39+
vTaskDelay(pdMS_TO_TICKS(20));
40+
}
41+
}
42+
3743
void app_main(void)
3844
{
3945
buzzer_driver_install(IO_BUZZER_CTRL);
40-
proxi_config_t config = (proxi_config_t)DEFAULTS_PROX_CONFIGS();
41-
config.channel_num = 1;
42-
config.channel_list[0] = TOUCH_PAD_NUM8;
43-
config.meas_count = 50;
44-
config.smooth_coef = 0.2;
45-
config.baseline_coef = 0.1;
46-
config.max_p = 0.2;
47-
config.min_n = 0.08;
48-
config.threshold_p[0] = 0.002;
49-
config.threshold_n[0] = 0.002;
50-
config.hysteresis_p = 0.2;
51-
config.noise_p = 0.001;
52-
config.noise_n = 0.001;
53-
config.debounce_p = 2;
54-
config.debounce_n = 1;
55-
config.reset_p = 1000;
56-
config.reset_n = 3;
46+
47+
uint32_t channel_list[] = {TOUCH_PAD_NUM8, TOUCH_PAD_NUM10, TOUCH_PAD_NUM12};
48+
float channel_threshold[] = {0.008f, 0.008f, 0.008f};
49+
touch_proxi_config_t config = {
50+
.channel_num = 3,
51+
.channel_list = channel_list,
52+
.channel_threshold = channel_threshold,
53+
.debounce_times = 2,
54+
.skip_lowlevel_init = false,
55+
};
56+
5757
esp_err_t ret = touch_proximity_sensor_create(&config, &s_touch_proximity_sensor, &example_proxi_callback, NULL);
5858
if (ret != ESP_OK) {
59-
ESP_LOGE(TAG, "touch proximity sense create failed");
59+
ESP_LOGE(TAG, "touch proximity sensor create failed");
60+
return;
61+
}
62+
63+
xTaskCreate(proximity_task, "proximity_task", 4096, NULL, 5, NULL);
64+
ESP_LOGI(TAG, "touch proximity sensor started - approach the touch sub-board to trigger buzzer");
65+
66+
while (1) {
67+
vTaskDelay(pdMS_TO_TICKS(1000));
6068
}
61-
touch_proximity_sensor_start(s_touch_proximity_sensor);
62-
vTaskDelay(200 / portTICK_PERIOD_MS);
63-
ESP_LOGI(TAG, "touch proximity sensor has started! when you approach the touch sub-board, the buzzer will sound.");
6469
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file was generated using idf.py save-defconfig. It can be edited manually.
2+
# Espressif IoT Development Framework (ESP-IDF) 5.3.2 Project Minimal Configuration
3+
#
14
CONFIG_IDF_TARGET="esp32s3"
2-
CONFIG_FREERTOS_HZ=1000
3-
CONFIG_ENABLE_TOUCH_PROX_DEBUG=n
5+
CONFIG_TOUCH_PROXIMITY_SENSOR_DEBUG=y

‎tools/build_apps.py

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def get_cmake_apps(
6363
build_log_filename='build_log.txt',
6464
size_json_filename='size.json',
6565
check_warnings=True,
66+
no_preserve=False,
6667
default_build_targets=default_build_targets,
6768
manifest_files=[
6869
str(Path(PROJECT_ROOT) /'components'/'.build-rules.yml'),

0 commit comments

Comments
 (0)
Please sign in to comment.