Skip to content

Commit 9da4bbe

Browse files
restyled-commitsarun-silabs
authored andcommitted
Restyled by clang-format
1 parent e09e9d8 commit 9da4bbe

File tree

3 files changed

+41
-34
lines changed

3 files changed

+41
-34
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#include "OvenUI.h"
2626

2727
#ifdef DISPLAY_ENABLED
28-
#include "lcd.h"
2928
#include "OvenUI.h"
29+
#include "lcd.h"
3030
#ifdef QR_CODE_ENABLED
3131
#include "qrcodegen.h"
3232
#endif // QR_CODE_ENABLED
@@ -173,7 +173,7 @@ void AppTask::OvenButtonHandler(AppEvent * aEvent)
173173
OvenManager::Action_t action = (OvenManager::GetInstance().GetCookTopState() == OvenManager::kCookTopState_On)
174174
? OvenManager::COOK_TOP_OFF_ACTION
175175
: OvenManager::COOK_TOP_ON_ACTION;
176-
176+
177177
// Toggle CookTop
178178
chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, reinterpret_cast<intptr_t>(nullptr));
179179

@@ -184,7 +184,8 @@ void AppTask::OvenButtonHandler(AppEvent * aEvent)
184184
context->localEndpointId = OvenManager::GetCookTopEndpoint(); // CookTop endpoint
185185
context->commandId = (action == OvenManager::COOK_TOP_ON_ACTION) ? OnOff::Commands::On::Id : OnOff::Commands::Off::Id;
186186

187-
ChipLogProgress(AppServer, "Triggering binding for cooktop endpoint with command %lu", static_cast<unsigned long>(context->commandId));
187+
ChipLogProgress(AppServer, "Triggering binding for cooktop endpoint with command %lu",
188+
static_cast<unsigned long>(context->commandId));
188189
CookTopOnOffBindingTrigger(context);
189190
}
190191
}
@@ -198,7 +199,8 @@ void AppTask::UpdateClusterState(intptr_t context)
198199
ChipLogProgress(AppServer, "Updating cooktop OnOff cluster state to %s", currentState ? "On" : "Off");
199200

200201
// Set the OnOff attribute value for the cooktop endpoint
201-
Protocols::InteractionModel::Status status = OnOffServer::Instance().setOnOffValue(OvenManager::GetCookTopEndpoint(), currentState, false);
202+
Protocols::InteractionModel::Status status =
203+
OnOffServer::Instance().setOnOffValue(OvenManager::GetCookTopEndpoint(), currentState, false);
202204

203205
if (status != Protocols::InteractionModel::Status::Success)
204206
{

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,13 @@ void OvenManager::Init()
8080
VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(AppServer, "RegisterSupportedLevels failed for CookSurfaceEndpoint2"));
8181

8282
// Get CookTop On/Off value
83+
<<<<<<< HEAD
8384
bool currentState = false;
8485
chip::Protocols::InteractionModel::Status status = OnOffServer::Instance().getOnOffValue(kCookTopEndpoint, &currentState);
86+
=======
87+
bool currentLedState = false;
88+
chip::Protocols::InteractionModel::Status status = OnOffServer::Instance().getOnOffValue(kCookTopEndpoint, &currentLedState);
89+
>>>>>>> 3c958a2913 (Restyled by clang-format)
8590
VerifyOrReturn(status == Status::Success, ChipLogError(AppServer, "Failed to get CookTop OnOff value"));
8691
mCookTopState = currentState ? kCookTopState_On : kCookTopState_Off;
8792

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

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -124,36 +124,36 @@ void OvenUI::DrawOvenMode(GLIB_Context_t * glibContext)
124124
// Display oven mode on line 6
125125
switch (currentMode)
126126
{
127-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeBake):
128-
GLIB_drawStringOnLine(glibContext, "MODE: BAKE", 6, GLIB_ALIGN_LEFT, 0, 0, true);
129-
break;
130-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeConvection):
131-
GLIB_drawStringOnLine(glibContext, "MODE: CONVECTION", 6, GLIB_ALIGN_LEFT, 0, 0, true);
132-
break;
133-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeGrill):
134-
GLIB_drawStringOnLine(glibContext, "MODE: GRILL", 6, GLIB_ALIGN_LEFT, 0, 0, true);
135-
break;
136-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeRoast):
137-
GLIB_drawStringOnLine(glibContext, "MODE: ROAST", 6, GLIB_ALIGN_LEFT, 0, 0, true);
138-
break;
139-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeClean):
140-
GLIB_drawStringOnLine(glibContext, "MODE: CLEAN", 6, GLIB_ALIGN_LEFT, 0, 0, true);
141-
break;
142-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeConvectionBake):
143-
GLIB_drawStringOnLine(glibContext, "MODE: CONV BAKE", 6, GLIB_ALIGN_LEFT, 0, 0, true);
144-
break;
145-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeConvectionRoast):
146-
GLIB_drawStringOnLine(glibContext, "MODE: CONV ROAST", 6, GLIB_ALIGN_LEFT, 0, 0, true);
147-
break;
148-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeWarming):
149-
GLIB_drawStringOnLine(glibContext, "MODE: WARMING", 6, GLIB_ALIGN_LEFT, 0, 0, true);
150-
break;
151-
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeProofing):
152-
GLIB_drawStringOnLine(glibContext, "MODE: PROOFING", 6, GLIB_ALIGN_LEFT, 0, 0, true);
153-
break;
154-
default:
155-
GLIB_drawStringOnLine(glibContext, "MODE: UNKNOWN", 6, GLIB_ALIGN_LEFT, 0, 0, true);
156-
break;
127+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeBake):
128+
GLIB_drawStringOnLine(glibContext, "MODE: BAKE", 6, GLIB_ALIGN_LEFT, 0, 0, true);
129+
break;
130+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeConvection):
131+
GLIB_drawStringOnLine(glibContext, "MODE: CONVECTION", 6, GLIB_ALIGN_LEFT, 0, 0, true);
132+
break;
133+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeGrill):
134+
GLIB_drawStringOnLine(glibContext, "MODE: GRILL", 6, GLIB_ALIGN_LEFT, 0, 0, true);
135+
break;
136+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeRoast):
137+
GLIB_drawStringOnLine(glibContext, "MODE: ROAST", 6, GLIB_ALIGN_LEFT, 0, 0, true);
138+
break;
139+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeClean):
140+
GLIB_drawStringOnLine(glibContext, "MODE: CLEAN", 6, GLIB_ALIGN_LEFT, 0, 0, true);
141+
break;
142+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeConvectionBake):
143+
GLIB_drawStringOnLine(glibContext, "MODE: CONV BAKE", 6, GLIB_ALIGN_LEFT, 0, 0, true);
144+
break;
145+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeConvectionRoast):
146+
GLIB_drawStringOnLine(glibContext, "MODE: CONV ROAST", 6, GLIB_ALIGN_LEFT, 0, 0, true);
147+
break;
148+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeWarming):
149+
GLIB_drawStringOnLine(glibContext, "MODE: WARMING", 6, GLIB_ALIGN_LEFT, 0, 0, true);
150+
break;
151+
case chip::to_underlying(OvenModeDelegate::OvenModes::kModeProofing):
152+
GLIB_drawStringOnLine(glibContext, "MODE: PROOFING", 6, GLIB_ALIGN_LEFT, 0, 0, true);
153+
break;
154+
default:
155+
GLIB_drawStringOnLine(glibContext, "MODE: UNKNOWN", 6, GLIB_ALIGN_LEFT, 0, 0, true);
156+
break;
157157
}
158158

159159
#if SL_LCDCTRL_MUX

0 commit comments

Comments
 (0)