Skip to content

Commit

Permalink
chip::app::Clusters::OnOff::Attributes::OnOff accessors does not work…
Browse files Browse the repository at this point in the history
… because it is confused by the cluster and the attribute having the same name (#10877)
  • Loading branch information
vivien-apple authored and pull[bot] committed Oct 25, 2021
1 parent daccab2 commit 551494b
Show file tree
Hide file tree
Showing 2 changed files with 2,057 additions and 2,128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ namespace {{asUpperCamelCase label}} {

EmberAfStatus Get(chip::EndpointId endpoint, {{asUnderlyingZclType type}} * {{asLowerCamelCase label}})
{
return emberAfReadServerAttribute(endpoint, {{asUpperCamelCase parent.label}}::Id, {{asUpperCamelCase label}}::Id, (uint8_t *) {{asLowerCamelCase label}}, sizeof(*{{asLowerCamelCase label}}));
return emberAfReadServerAttribute(endpoint, Clusters::{{asUpperCamelCase parent.label}}::Id, Id, (uint8_t *) {{asLowerCamelCase label}}, sizeof(*{{asLowerCamelCase label}}));

}
EmberAfStatus Set(chip::EndpointId endpoint, {{asUnderlyingZclType type}} {{asLowerCamelCase label}})
{
return emberAfWriteServerAttribute(endpoint, {{asUpperCamelCase parent.label}}::Id, {{asUpperCamelCase label}}::Id, (uint8_t *) &{{asLowerCamelCase label}}, ZCL_{{asDelimitedMacro type}}_ATTRIBUTE_TYPE);
return emberAfWriteServerAttribute(endpoint, Clusters::{{asUpperCamelCase parent.label}}::Id, Id, (uint8_t *) &{{asLowerCamelCase label}}, ZCL_{{asDelimitedMacro type}}_ATTRIBUTE_TYPE);
}

} // namespace {{asUpperCamelCase label}}
Expand Down
Loading

0 comments on commit 551494b

Please sign in to comment.