-
Notifications
You must be signed in to change notification settings - Fork 32
[SL-ONLY] LCD, LED and Button implementation for Oven-app. #700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/oven_app_bindings_implementation
Are you sure you want to change the base?
[SL-ONLY] LCD, LED and Button implementation for Oven-app. #700
Conversation
| #include "AppEvent.h" | ||
| #include "LEDWidget.h" | ||
| #include "OvenBindingHandler.h" | ||
| #include "OvenUI.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended? Seems like double inclusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, OvenUI.h should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements hardware UI functionality for the Silabs oven application, including LCD display management, LED control, and button input handling. The implementation adds visual feedback for cooktop state and oven mode, along with button-triggered control of the cooktop endpoint.
Key changes:
- New
OvenUIclass with LCD rendering methods for cooktop state and oven mode display - LED control integration with cooktop on/off state
- Button handler for toggling cooktop and triggering binding events
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/oven-app/silabs/src/OvenUI.cpp | New file implementing LCD UI rendering for oven state visualization |
| examples/oven-app/silabs/include/OvenUI.h | Header defining OvenUI class interface for LCD drawing functions |
| examples/oven-app/silabs/src/OvenManager.cpp | Adds initialization of cooktop state and oven mode from cluster attributes, updates LCD on attribute changes |
| examples/oven-app/silabs/include/OvenManager.h | Adds getter methods for cooktop state, oven mode, and endpoint IDs |
| examples/oven-app/silabs/src/AppTask.cpp | Implements button handling, LED updates, and LCD refresh on state changes |
| examples/oven-app/silabs/include/AppTask.h | Adds UpdateLED/UpdateLCD methods and OvenButtonHandler declaration |
| examples/oven-app/silabs/BUILD.gn | Adds OvenUI.cpp to build sources |
| : OvenManager::ON_ACTION; | ||
|
|
||
| // Toggle CookTop | ||
| chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, reinterpret_cast<intptr_t>(nullptr)); |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using reinterpret_cast<intptr_t>(nullptr) is unnecessarily complex. Since the UpdateClusterState function doesn't use the context parameter, pass 0 directly or use static_cast<intptr_t>(0) for clarity.
| chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, reinterpret_cast<intptr_t>(nullptr)); | |
| chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, 0); |
|
|
||
| /** | ||
| * @brief PB0 Button event processing function | ||
| * Press and hold will trigger a factory reset timer start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this not apply anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PB0 handling is done by ButtonHandler API in BaseApplication, this function is not being used.
774add2 to
97c039b
Compare
3c958a2 to
9da4bbe
Compare
Co-authored-by: Copilot <[email protected]>
| VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(AppServer, "RegisterSupportedLevels failed for CookSurfaceEndpoint2")); | ||
|
|
||
| // Get CookTop On/Off value | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a conflict wasn't resolved... this shouldn't compile as well...
Summary
This PR adds the logic to handle the hardware actions in Oven app.The actions mainly are : Updating LED, updating LCD and handling the oven-app behavior on button press.
Related issues
MATTER-5575
Testing
Built oven-app locally and tested the LCD, LED updates by sending onoff command and verified the button 1 implementation locally.
Readability checklist
The checklist below will help the reviewer finish PR review in time and keep the
code readable:
descriptive
“When in Rome…”
rule (coding style)
See: Pull Request Guidelines