-
-
Notifications
You must be signed in to change notification settings - Fork 2
Fix: Screensaver page and date display #78
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8d529fc
Reduce log level of watchdog round
edwardtfn b521887
Set `_{_xxx_}_` as mask for text to be replaced
edwardtfn 62a35d4
Call `refresh_hardware_buttons_bars` when rendering page screensaver …
edwardtfn 15c7bc2
Filter out climate pages values not selected
edwardtfn d9edda9
Add page screensaver to component
edwardtfn 027aa90
Do not reset timer when going to sleep
edwardtfn 498b521
Add support to `-d` and `-m` in date format and log date rendering er…
edwardtfn a4d1b7d
style: apply clang-format
edwardtfn 2a71b21
bump blueprint version
edwardtfn 58b1a45
Merge branch 'v9999.99.9' of https://github.com/edwardtfn/NSPanel-Eas…
edwardtfn 01bc8ae
Add guards to time rendering
edwardtfn 8494d21
Use the same timestamp to render both time and date
edwardtfn 04fc9f3
Derive the page ID instead of duplicating
edwardtfn 3d9c649
Add timestamp validation
edwardtfn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // page_screensaver.cpp | ||
|
|
||
| #ifdef NSPANEL_EASY_PAGE_SCREENSAVER | ||
|
|
||
| #include "page_screensaver.h" | ||
|
|
||
| /** | ||
| * @file page_screensaver.cpp | ||
| * @brief Definitions for the Screensaver page. | ||
| * | ||
| * Provides the out-of-line definitions for variables declared in | ||
| * page_screensaver.h. | ||
| */ | ||
|
|
||
| namespace esphome { | ||
| namespace nspanel_easy {} // namespace nspanel_easy | ||
| } // namespace esphome | ||
|
|
||
| #endif // NSPANEL_EASY_PAGE_SCREENSAVER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // page_screensaver.h | ||
|
|
||
| #pragma once | ||
|
|
||
| #ifdef NSPANEL_EASY_PAGE_SCREENSAVER | ||
|
|
||
| #include "nextion_components.h" // For HMIComponent | ||
| #include "pages.h" // For page_names and get_page_id | ||
|
|
||
| /** | ||
| * @file page_screensaver.h | ||
| * @brief Nextion component definitions for the Screensaver page. | ||
| * | ||
| * This file contains all component constants specific to the Screensaver page | ||
| * of the NSPanel interface, along with the persistent visibility flag used to | ||
| * avoid redundant display updates. | ||
| */ | ||
|
|
||
| namespace esphome { | ||
| namespace nspanel_easy { | ||
|
|
||
| namespace hmi { | ||
| namespace screensaver { | ||
|
|
||
| /** | ||
| * @namespace screensaver | ||
| * @brief Components for the Screensaver page. | ||
| * | ||
| * Component ID mapping for the Screensaver page (index 9 in page_names array). | ||
| * Based on the Nextion HMI design file. | ||
| * Note: All components are local scope, so names do not include a page prefix. | ||
| */ | ||
|
|
||
| // Page definition | ||
| constexpr HMIComponent PAGE = {"screensaver", get_page_id("screensaver")}; | ||
|
|
||
| // Display components | ||
| constexpr HMIComponent TEXT = {"text", 4}; ///< Time/clock label (word-wrap enabled, 1000 chars max) | ||
|
|
||
| // Touch capture components | ||
| constexpr HMIComponent WAKEUP = {"wakeup", 1}; ///< Full-screen wake-up touch area | ||
| constexpr HMIComponent SWIPE = {"swipe", 2}; ///< Swipe gesture capture area | ||
|
|
||
| // Timers (for reference — not visual, excluded from ALL[]) | ||
| constexpr HMIComponent TIMER_SWIPESTORE = {"swipestore", 3}; ///< Swipe coordinate sampling timer (50 ms) | ||
|
|
||
| // All visual components for iteration (timers and touch caps excluded) | ||
| constexpr HMIComponent ALL[] = {PAGE, TEXT}; | ||
|
|
||
| constexpr size_t COMPONENT_COUNT = sizeof(ALL) / sizeof(ALL[0]); | ||
|
|
||
| } // namespace screensaver | ||
| } // namespace hmi | ||
| } // namespace nspanel_easy | ||
| } // namespace esphome | ||
|
|
||
| #endif // NSPANEL_EASY_PAGE_SCREENSAVER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.