Skip to content

Commit

Permalink
Pull request #143: In emberAfEndpointConfigure() change endpoint ID t…
Browse files Browse the repository at this point in the history
…o 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>
  • Loading branch information
mkardous-silabs authored and jmartinez-silabs committed Oct 26, 2022
1 parent f72d359 commit 12c147b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/clusters/on-off-server/on-off-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ EmberAfStatus OnOffServer::getOnOffValue(chip::EndpointId endpoint, bool * curre
* @param command Ver.: always
* @param initiatedByLevelChange Ver.: always
*/
EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t command, bool initiatedByLevelChange)
EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::CommandId command, bool initiatedByLevelChange)
{
EmberAfStatus status;
bool currentValue, newValue;

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

// read current on/off value
status = Attributes::OnOff::Get(endpoint, &currentValue);
Expand Down
2 changes: 1 addition & 1 deletion src/app/clusters/on-off-server/on-off-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class OnOffServer
const chip::app::Clusters::OnOff::Commands::OnWithTimedOff::DecodableType & commandData);
void updateOnOffTimeCommand(chip::EndpointId endpoint);
EmberAfStatus getOnOffValue(chip::EndpointId endpoint, bool * currentOnOffValue);
EmberAfStatus setOnOffValue(chip::EndpointId endpoint, uint8_t command, bool initiatedByLevelChange);
EmberAfStatus setOnOffValue(chip::EndpointId endpoint, chip::CommandId command, bool initiatedByLevelChange);
EmberAfStatus getOnOffValueForStartUp(chip::EndpointId endpoint, bool & onOffValueForStartUp);

bool HasFeature(chip::EndpointId endpoint, OnOffFeature feature);
Expand Down
2 changes: 1 addition & 1 deletion src/app/util/attribute-storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterI
// Initial configuration
void emberAfEndpointConfigure(void)
{
uint8_t ep;
uint16_t ep;

#if !defined(EMBER_SCRIPTED_TEST)
uint16_t fixedEndpoints[] = FIXED_ENDPOINT_ARRAY;
Expand Down

0 comments on commit 12c147b

Please sign in to comment.