mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 11:03:05 +00:00
Merge branch 'bugfix/rainmaker_fix' into 'main'
esp_matter_rainmaker: Fixing compilation See merge request app-frameworks/esp-matter!157
This commit is contained in:
@@ -294,6 +294,9 @@ static esp_err_t console_handler(int argc, char **argv)
|
||||
} else if (type == ESP_MATTER_VAL_TYPE_BITMAP32) {
|
||||
uint32_t value = atoi(argv[4]);
|
||||
val = esp_matter_bitmap32(value);
|
||||
} else if (type == ESP_MATTER_VAL_TYPE_ENUM8) {
|
||||
uint8_t value = atoi(argv[4]);
|
||||
val = esp_matter_enum8(value);
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Type not handled: %d", type);
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
@@ -365,6 +368,10 @@ static esp_err_t console_handler(int argc, char **argv)
|
||||
uint32_t value = 0;
|
||||
get_val_raw(endpoint_id, cluster_id, attribute_id, (uint8_t *)&value, sizeof(value));
|
||||
val = esp_matter_bitmap32(value);
|
||||
} else if (type == ESP_MATTER_VAL_TYPE_ENUM8) {
|
||||
uint8_t value = 0;
|
||||
get_val_raw(endpoint_id, cluster_id, attribute_id, (uint8_t *)&value, sizeof(value));
|
||||
val = esp_matter_enum8(value);
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Type not handled: %d", type);
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#define ESP_MATTER_RAINMAKER_COMMAND_LIMIT 5 /* This command can be called 5 times per reboot */
|
||||
#define ESP_MATTER_RAINMAKER_MAX_DATA_LEN 40
|
||||
|
||||
using namespace chip::app::Clusters;
|
||||
|
||||
static const char *TAG = "esp_matter_rainmaker";
|
||||
|
||||
namespace esp_matter {
|
||||
|
||||
Reference in New Issue
Block a user