You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VerifyOrReturnError((get_feature_map_value(cluster) & feature::momentary_switch::get_id()) != feature::momentary_switch::get_id(), ESP_ERR_NOT_SUPPORTED, ESP_LOGE(TAG, "Latching switch is not supported because momentary switch is present"));
VerifyOrReturnError((get_feature_map_value(cluster) & feature::latching_switch::get_id()) != feature::latching_switch::get_id(), ESP_ERR_NOT_SUPPORTED, ESP_LOGE(TAG, "Momentary switch is not supported because latching switch is present"));
VerifyOrReturnError((get_feature_map_value(cluster) & feature::momentary_switch::get_id()) == feature::momentary_switch::get_id(), ESP_ERR_NOT_SUPPORTED, ESP_LOGE(TAG, "Momentary switch release is not supported because momentary is absent"));
VerifyOrReturnError((get_feature_map_value(cluster) & momentary_and_momentart_switch_release_feature_map) == momentary_and_momentart_switch_release_feature_map, ESP_ERR_NOT_SUPPORTED, ESP_LOGE(TAG, "Momentary switch long press is not supported because momentary switch and/or momentary switch release is absent"));
VerifyOrReturnError((feature_map & ms_feature_map) != ms_feature_map, ESP_ERR_NOT_SUPPORTED, ESP_LOGE(TAG, "Momentary switch long press is not supported."));
2834
+
VerifyOrReturnError(((feature_map & msr_feature_map) != msr_feature_map) && ((feature_map & as_feature_map) != as_feature_map), ESP_ERR_NOT_SUPPORTED, ESP_LOGE(TAG, "Momentary switch long press is not supported."));
VerifyOrReturnError((get_feature_map_value(cluster) & as_feature_map) != as_feature_map, ESP_ERR_NOT_SUPPORTED, ESP_LOGE(TAG, "Momentary switch multi press is not supported because action switch is absent"));
Copy file name to clipboardexpand all lines: examples/generic_switch/README.md
+6-50
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,10 @@
3
3
This example creates a Generic Switch device using the ESP
4
4
Matter data model.
5
5
This example demonstrates the use of few optional data model elements like :
6
-
- Fixed Label Cluster : provides a feature for the device to tag an endpoint with zero or more read only labels (demonstrated through nvs).
7
-
- User Label Cluster : This cluster provides a feature to tag an endpoint with zero or more labels.
8
6
- Taglist Feature of Descriptor Cluster : used to disambiguate sibling endpoints where two or more sibling
9
7
endpoints have an overlap in the supported device types with each such endpoint having a unique TagList.
10
8
11
9
12
-
Note:
13
-
In order to retrieve the label-list from the fixed-label cluster the two options:
14
-
``CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER`` and ``CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER`` have been set through sdkconfig.defaults.
15
-
16
10
See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html) for more information about building and flashing the firmware.
17
11
18
12
## 1. Additional Environment Setup
@@ -31,73 +25,35 @@ through menuconfig:
31
25
32
26
Follow the steps mentioned [here](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/insights.html)
33
27
34
-
### 1.3 Flash the factory partition
35
-
36
-
The steps below should be followed in order to access the fixed-labels.
37
-
- If monitoring the device using ``idf.py monitor``,press `` Ctrl + ]`` to stop the process.
38
-
- The following command must be executed to flash the mfg partition:
0 commit comments