Skip to content

Commit

Permalink
Merge branch 'fix_timer_fmt_cluster' into 'main'
Browse files Browse the repository at this point in the history
time-format and active-calendar-type are not nullable attributes in spec

See merge request app-frameworks/esp-matter!690
  • Loading branch information
dhrishi committed Apr 6, 2024
2 parents a119520 + 9d2af77 commit 2418e66
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions components/esp_matter/esp_matter_attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3404,18 +3404,18 @@ attribute_t *create_supported_locales(cluster_t *cluster, uint8_t *value, uint16
namespace time_format_localization {
namespace attribute {

attribute_t *create_hour_format(cluster_t *cluster, nullable<uint8_t> value)
attribute_t *create_hour_format(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, TimeFormatLocalization::Attributes::HourFormat::Id,
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE | ATTRIBUTE_FLAG_NULLABLE,
esp_matter_nullable_enum8(value));
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE,
esp_matter_enum8(value));
}

attribute_t *create_active_calendar_type(cluster_t *cluster, nullable<uint8_t> value)
attribute_t *create_active_calendar_type(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, TimeFormatLocalization::Attributes::ActiveCalendarType::Id,
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE | ATTRIBUTE_FLAG_NULLABLE,
esp_matter_nullable_enum8(value));
ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE,
esp_matter_enum8(value));
}

attribute_t *create_supported_calendar_types(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
Expand Down
4 changes: 2 additions & 2 deletions components/esp_matter/esp_matter_attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,8 @@ attribute_t *create_supported_locales(cluster_t *cluster, uint8_t *value, uint16

namespace time_format_localization {
namespace attribute {
attribute_t *create_hour_format(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_active_calendar_type(cluster_t *cluster, nullable<uint8_t> value);
attribute_t *create_hour_format(cluster_t *cluster, uint8_t value);
attribute_t *create_active_calendar_type(cluster_t *cluster, uint8_t value);
attribute_t *create_supported_calendar_types(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
} /* attribute */
} /* time_format_localization */
Expand Down
2 changes: 1 addition & 1 deletion components/esp_matter/esp_matter_cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
namespace time_format_localization {
typedef struct config {
uint16_t cluster_revision;
nullable<uint8_t> hour_format;
uint8_t hour_format;
feature::calendar_format::config_t calendar_format;
config() : cluster_revision(4), hour_format(0) {}
} config_t;
Expand Down
2 changes: 1 addition & 1 deletion components/esp_matter/esp_matter_feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ namespace feature {
namespace calendar_format {

typedef struct config {
nullable<uint8_t> active_calendar_type;
uint8_t active_calendar_type;
config() : active_calendar_type(0) {}
} config_t;

Expand Down

0 comments on commit 2418e66

Please sign in to comment.