mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 11:03:05 +00:00
Merge branch 'fix-attribute-types-1-2' into 'release/v1.2'
[v1.2] components/esp-matter: fix types for on_time and off_wait_time See merge request app-frameworks/esp-matter!1348
This commit is contained in:
@@ -1088,18 +1088,18 @@ attribute_t *create_global_scene_control(cluster_t *cluster, bool value)
|
||||
esp_matter_bool(value));
|
||||
}
|
||||
|
||||
attribute_t *create_on_time(cluster_t *cluster, nullable<uint16_t> value)
|
||||
attribute_t *create_on_time(cluster_t *cluster, uint16_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, OnOff::Attributes::OnTime::Id,
|
||||
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NULLABLE,
|
||||
esp_matter_nullable_uint16(value));
|
||||
ATTRIBUTE_FLAG_WRITABLE,
|
||||
esp_matter_uint16(value));
|
||||
}
|
||||
|
||||
attribute_t *create_off_wait_time(cluster_t *cluster, nullable<uint16_t> value)
|
||||
attribute_t *create_off_wait_time(cluster_t *cluster, uint16_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, OnOff::Attributes::OffWaitTime::Id,
|
||||
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NULLABLE,
|
||||
esp_matter_nullable_uint16(value));
|
||||
ATTRIBUTE_FLAG_WRITABLE,
|
||||
esp_matter_uint16(value));
|
||||
}
|
||||
|
||||
attribute_t *create_start_up_on_off(cluster_t *cluster, nullable<uint8_t> value)
|
||||
|
||||
@@ -309,8 +309,8 @@ namespace on_off {
|
||||
namespace attribute {
|
||||
attribute_t *create_on_off(cluster_t *cluster, bool value);
|
||||
attribute_t *create_global_scene_control(cluster_t *cluster, bool value);
|
||||
attribute_t *create_on_time(cluster_t *cluster, nullable<uint16_t> value);
|
||||
attribute_t *create_off_wait_time(cluster_t *cluster, nullable<uint16_t> value);
|
||||
attribute_t *create_on_time(cluster_t *cluster, uint16_t value);
|
||||
attribute_t *create_off_wait_time(cluster_t *cluster, uint16_t value);
|
||||
attribute_t *create_start_up_on_off(cluster_t *cluster, nullable<uint8_t> value);
|
||||
} /* attribute */
|
||||
} /* on_off */
|
||||
|
||||
@@ -164,8 +164,8 @@ namespace lighting {
|
||||
|
||||
typedef struct config {
|
||||
bool global_scene_control;
|
||||
nullable<uint16_t> on_time;
|
||||
nullable<uint16_t> off_wait_time;
|
||||
uint16_t on_time;
|
||||
uint16_t off_wait_time;
|
||||
nullable<uint8_t> start_up_on_off;
|
||||
config() : global_scene_control(1), on_time(0), off_wait_time(0), start_up_on_off(0) {}
|
||||
} config_t;
|
||||
|
||||
Reference in New Issue
Block a user