Skip to content

Commit 81ee2a0

Browse files
arun-silabsCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 0928fbb commit 81ee2a0

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

examples/oven-app/oven-app-common/include/AppSupportedTemperatureLevelsDelegate.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ class AppSupportedTemperatureLevelsDelegate : public TemperatureControl::Support
4747
static CharSpan temperatureLevelOptions[3];
4848

4949
public:
50-
// Use a fixed size of 2 for oven app (cook-surface multiple endpoints: 4, 5)
51-
static const EndpointPair supportedOptionsByEndpoints[2];
50+
// Use a fixed size for oven app (cook-surface multiple endpoints: 4, 5)
51+
static constexpr size_t kNumCookSurfaceEndpoints = 2;
52+
static const EndpointPair supportedOptionsByEndpoints[kNumCookSurfaceEndpoints];
5253

5354
uint8_t Size() override;
5455

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ CHIP_ERROR OvenModeDelegate::Init()
9696
void OvenModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response)
9797
{
9898
ChipLogProgress(Zcl, "OvenModeDelegate::HandleChangeToMode: NewMode=%d", NewMode);
99-
// Here, add code to handle the mode change
99+
// TODO: Implement logic to change the oven mode.
100+
// This should update the oven's state and perform any necessary actions (e.g., start heating, change temperature)
101+
// based on the value of NewMode. If the mode change fails, set response.status to the appropriate error code.
100102
response.status = to_underlying(ModeBase::StatusCode::kSuccess);
101103
}
102104

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class AppTask : public BaseApplication
9191
/**
9292
* @brief PB0 Button event processing function
9393
* Press and hold will trigger a factory reset timer start
94-
* Press and release will restart BLEAdvertising if not commisionned
94+
* Press and release will restart BLEAdvertising if not commissioned
9595
*
9696
* @param aEvent button event being processed
9797
*/

0 commit comments

Comments
 (0)