Skip to content

Commit cd39178

Browse files
restyled-commitsarun-silabs
authored andcommitted
Restyled by clang-format
1 parent 5a7500a commit cd39178

File tree

6 files changed

+9
-21
lines changed

6 files changed

+9
-21
lines changed

examples/oven-app/oven-app-common/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ config("config") {
2323
chip_data_model("oven-app-common") {
2424
zap_file = "oven-app.zap"
2525
is_server = true
26+
public_deps = [ "${chip_root}/src/app/clusters/bindings:binding-manager" ]
2627
}

examples/oven-app/oven-app-common/src/CookSurfaceEndpoint.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ using namespace chip::app::Clusters::CookSurface;
2626

2727
CHIP_ERROR CookSurfaceEndpoint::Init()
2828
{
29-
bool state = false;
30-
OnOffServer::Instance().getOnOffValue(mEndpointId, &state);
3129
return CHIP_NO_ERROR;
3230
}
3331

examples/oven-app/silabs/BUILD.gn

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,7 @@ silabs_executable("oven_app") {
113113
"src/OvenManager.cpp",
114114
]
115115

116-
deps = [
117-
":sdk",
118-
"${chip_root}/src/app/clusters/bindings:binding-manager",
119-
]
116+
deps = [ ":sdk" ]
120117

121118
if (wifi_soc) {
122119
deps += [ "${examples_plat_dir}:siwx917-common" ]

examples/oven-app/silabs/include/OvenBindingHandler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
#include <app-common/zap-generated/ids/Clusters.h>
77
#include <app-common/zap-generated/ids/Commands.h>
8-
#include <lib/core/CHIPError.h>
9-
#include <lib/core/CHIPCallback.h>
108
#include <app/util/basic-types.h>
9+
#include <lib/core/CHIPCallback.h>
10+
#include <lib/core/CHIPError.h>
1111

1212
struct OnOffBindingContext
1313
{

examples/oven-app/silabs/include/OvenManager.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@
2828
#pragma once
2929

3030
#include "AppSupportedTemperatureLevelsDelegate.h"
31-
#include "OvenEndpoint.h"
32-
#include "CookTopEndpoint.h"
3331
#include "CookSurfaceEndpoint.h"
32+
#include "CookTopEndpoint.h"
33+
#include "OvenEndpoint.h"
3434

3535
#include "AppEvent.h"
3636

3737
#include <app-common/zap-generated/ids/Attributes.h>
3838
#include <app/clusters/mode-base-server/mode-base-cluster-objects.h>
3939
#include <app/clusters/on-off-server/on-off-server.h>
40-
#include <app/clusters/mode-base-server/mode-base-cluster-objects.h>
4140
#include <lib/core/DataModelTypes.h>
4241
#include <lib/support/TypeTraits.h>
4342
#include <platform/CHIPDeviceLayer.h>
@@ -119,13 +118,6 @@ class OvenManager
119118
*/
120119
void OvenModeAttributeChangeHandler(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value, uint16_t size);
121120

122-
/**
123-
* @brief Central handler for OvenMode delegate requests. Applies validation, blocked-transition policy,
124-
* and writes the CurrentMode attribute if allowed.
125-
*/
126-
void ProcessOvenModeChange(chip::EndpointId endpointId, uint8_t newMode,
127-
chip::app::Clusters::ModeBase::Commands::ChangeToModeResponse::Type & response);
128-
129121
/**
130122
* @brief Checks if a transition between two oven modes is blocked.
131123
*

examples/oven-app/silabs/src/OvenManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#include "OvenManager.h"
2020
#include "CookSurfaceEndpoint.h"
2121
#include "CookTopEndpoint.h"
22-
#include "OvenEndpoint.h"
2322
#include "OvenBindingHandler.h"
23+
#include "OvenEndpoint.h"
2424

25-
#include <app-common/zap-generated/cluster-objects.h>
2625
#include <app-common/zap-generated/attributes/Accessors.h>
26+
#include <app-common/zap-generated/cluster-objects.h>
2727
#include <app/clusters/mode-base-server/mode-base-cluster-objects.h>
2828

2929
#include "AppConfig.h"
@@ -177,7 +177,7 @@ void OvenManager::OnOffAttributeChangeHandler(EndpointId endpointId, AttributeId
177177
OnOffBindingContext * context = Platform::New<OnOffBindingContext>();
178178

179179
context->localEndpointId = kCookTopEndpoint;
180-
context->commandId = *value ? Clusters::OnOff::Commands::On::Id : Clusters::OnOff::Commands::Off::Id;
180+
context->commandId = *value ? Clusters::OnOff::Commands::On::Id : Clusters::OnOff::Commands::Off::Id;
181181

182182
CookTopOnOffBindingTrigger(context);
183183
}

0 commit comments

Comments
 (0)