-
Notifications
You must be signed in to change notification settings - Fork 31
[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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /* | ||
| * | ||
| * Copyright (c) 2025 Project CHIP Authors | ||
| * All rights reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "demo-ui-bitmaps.h" | ||
| #include "dmd.h" | ||
| #include "glib.h" | ||
| #include "lcd.h" | ||
|
|
||
| class OvenUI | ||
| { | ||
|
|
||
| public: | ||
| static void DrawUI(GLIB_Context_t * glibContext); | ||
|
|
||
| private: | ||
| static void DrawHeader(GLIB_Context_t * glibContext); | ||
| static void DrawCookTopState(GLIB_Context_t * glibContext); | ||
| static void DrawOvenMode(GLIB_Context_t * glibContext); | ||
| static void DrawFont(GLIB_Context_t * glibContext, uint8_t initial_x, uint8_t initial_y, uint8_t width, uint8_t * data, | ||
| uint32_t size); | ||
| }; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,8 +21,11 @@ | |||||||||||||||||||||
| #include "AppConfig.h" | ||||||||||||||||||||||
| #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 commentThe reason will be displayed to describe this comment to others. Learn more. Is this intended? Seems like double inclusion |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| #ifdef DISPLAY_ENABLED | ||||||||||||||||||||||
| #include "OvenUI.h" | ||||||||||||||||||||||
|
||||||||||||||||||||||
| #include "OvenUI.h" |
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); |
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.
The OnOff cluster is being set to the current state rather than the new toggled state. Line 225 reads the current state, but the toggle logic should invert this value before setting it. The state should be !currentState to achieve the toggle behavior.
| ChipLogProgress(AppServer, "Updating cooktop OnOff cluster state to %s", currentState ? "On" : "Off"); | |
| // Set the OnOff attribute value for the cooktop endpoint | |
| Protocols::InteractionModel::Status status = | |
| OnOffServer::Instance().setOnOffValue(OvenManager::GetCookTopEndpoint(), currentState, false); | |
| ChipLogProgress(AppServer, "Updating cooktop OnOff cluster state to %s", !currentState ? "On" : "Off"); | |
| // Set the OnOff attribute value for the cooktop endpoint | |
| Protocols::InteractionModel::Status status = | |
| OnOffServer::Instance().setOnOffValue(OvenManager::GetCookTopEndpoint(), !currentState, false); |
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?