Skip to content

Commit 665805a

Browse files
mkardous-silabsjmartinez-silabs
authored andcommitted
Pull request project-chip#143: In emberAfEndpointConfigure() change endpoint ID to a uint16_t (project-chip#22998)
Merge in WMN_TOOLS/matter from cherry_pick/unify_build_fix to silabs_1.0 Squashed commit of the following: commit 77f4fef74e58480c79bfb8dcfa67ffbdd57c61f3 Author: Sergei Lissianoi <54454955+selissia@users.noreply.github.com> Date: Mon Oct 3 16:51:28 2022 -0400 In emberAfEndpointConfigure() change endpoint ID to a uint16_t (project-chip#22998) * Test added march 8 (project-chip#15957) * Added new manual scripts * Added Auto generated File * [OTA] Fix OTARequestorDriverImpl inclusion (project-chip#15981) * Regen to fix CI failures (project-chip#15990) * [ota] Store Default OTA Providers in flash (project-chip#15970) * [ota] Store Default OTA Providers in flash Store Default OTA Providers in flash each time the attribute is modified and load it back on the application startup. * Restyled by clang-format * Fix build and reduce flash usage Co-authored-by: Restyled.io <commits@restyled.io> * Remove merge artifacts * Cast boolean to uint8_t as setOnOffValue expects, fixes GCC 8.3 error * Make endpoint id a uint16_t as per spec * Restyled by clang-format * Update the signature of OnOffServer::setOnOffValue() to avoid casts * Fix printf argument and formatting Co-authored-by: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Co-authored-by: Carol Yang <clyang@apple.com> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> Co-authored-by: Damian Królik <66667989+Damian-Nordic@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 5e8080e commit 665805a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/app/clusters/on-off-server/on-off-server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ EmberAfStatus OnOffServer::getOnOffValue(chip::EndpointId endpoint, bool * curre
109109
* @param command Ver.: always
110110
* @param initiatedByLevelChange Ver.: always
111111
*/
112-
EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t command, bool initiatedByLevelChange)
112+
EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::CommandId command, bool initiatedByLevelChange)
113113
{
114114
EmberAfStatus status;
115115
bool currentValue, newValue;
116116

117-
emberAfOnOffClusterPrintln("On/Off set value: %x %x", endpoint, command);
117+
emberAfOnOffClusterPrintln("On/Off set value: %x %x", endpoint, static_cast<uint8_t>(command));
118118

119119
// read current on/off value
120120
status = Attributes::OnOff::Get(endpoint, &currentValue);

src/app/clusters/on-off-server/on-off-server.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class OnOffServer
5959
const chip::app::Clusters::OnOff::Commands::OnWithTimedOff::DecodableType & commandData);
6060
void updateOnOffTimeCommand(chip::EndpointId endpoint);
6161
EmberAfStatus getOnOffValue(chip::EndpointId endpoint, bool * currentOnOffValue);
62-
EmberAfStatus setOnOffValue(chip::EndpointId endpoint, uint8_t command, bool initiatedByLevelChange);
62+
EmberAfStatus setOnOffValue(chip::EndpointId endpoint, chip::CommandId command, bool initiatedByLevelChange);
6363
EmberAfStatus getOnOffValueForStartUp(chip::EndpointId endpoint, bool & onOffValueForStartUp);
6464

6565
bool HasFeature(chip::EndpointId endpoint, OnOffFeature feature);

src/app/util/attribute-storage.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterI
129129
// Initial configuration
130130
void emberAfEndpointConfigure(void)
131131
{
132-
uint8_t ep;
132+
uint16_t ep;
133133

134134
#if !defined(EMBER_SCRIPTED_TEST)
135135
uint16_t fixedEndpoints[] = FIXED_ENDPOINT_ARRAY;

0 commit comments

Comments
 (0)