Skip to content

Merge small and large clock#363

Merged
JanPetterMG merged 19 commits intoVIPnytt:mainfrom
Solmath:feature/unify-clock-modes
Feb 21, 2026
Merged

Merge small and large clock#363
JanPetterMG merged 19 commits intoVIPnytt:mainfrom
Solmath:feature/unify-clock-modes

Conversation

@Solmath
Copy link
Copy Markdown
Contributor

@Solmath Solmath commented Feb 20, 2026

Key changes

  • Consolidate small and large clock modes into single clock mode

Impact

  • Only one clock mode in frontend with three fonts and ticking option

- Introduced ClockMode class with configuration and handling logic.
- Updated .env and modules.ts to include new clock mode.
- Refactored Deprecated.py to deprecate large and small clock modes.
- Added Clock component in the web application with state management.
- Updated WebSocket integration for clock mode settings.
@Solmath Solmath marked this pull request as draft February 20, 2026 20:29
@JanPetterMG
Copy link
Copy Markdown
Collaborator

Thanks for the effort — this is already looking quite clean. 🙌🏻

  • Labeler permissions are now fixed, so that job should pass on the next commit.
  • The Clang workflow reports additional findings. Two readability-math-missing-parentheses warnings that are quick fixes.
  • The remaining findings are acceptable as-is, so please raise the clang-threshold to 260 to reflect the new baseline.
    clang-threshold: 253

I haven’t tested the changes functionally yet, but I’m looking forward to seeing only one clock in the list. 👍🏻

@github-actions github-actions Bot added enhancement New feature or request frontend Web app related firmware C++ related labels Feb 21, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Feb 21, 2026
@Solmath
Copy link
Copy Markdown
Contributor Author

Solmath commented Feb 21, 2026

I fixed some clang-tidy findings and updated the documentation.

I wasn't happy with duplicating the draw() calls for small and large fonts, so I did some refactoring now. The only variables that are conditional now are the bottom y position (yBot) and the x padding of the digits (xPad lambda function).

@Solmath Solmath marked this pull request as ready for review February 21, 2026 12:44
Comment thread docs/wiki/Modes.md Outdated
Comment thread scripts/src/components/Deprecated.py Outdated
Comment thread firmware/src/modes/ClockMode.cpp Outdated
Solmath and others added 4 commits February 21, 2026 15:07
Co-authored-by: Jan-Petter Gundersen <europe.jpg@gmail.com>
Co-authored-by: Jan-Petter Gundersen <europe.jpg@gmail.com>
@JanPetterMG
Copy link
Copy Markdown
Collaborator

I noticed that FontMediumBold is carried over as the default from the old “Large clock”, while the seconds counter defaults to “on” from the “Small clock”. I’m not sure whether that combination was intentional.

This is mostly a matter of personal preference, but I’ve typically used the small clock with seconds enabled and the large clock with seconds disabled.

Feel free to adjust either setting as you see fit — or leave it unchanged.

@Solmath
Copy link
Copy Markdown
Contributor Author

Solmath commented Feb 21, 2026

Changing the default ticking state wasn't really intentional. Set it to false now.

Comment thread scripts/src/components/Deprecated.py Outdated
Comment thread scripts/src/components/Deprecated.py Outdated
Comment thread scripts/src/components/Deprecated.py Outdated
@Solmath
Copy link
Copy Markdown
Contributor Author

Solmath commented Feb 21, 2026

I noticed there's quite some duplicated code in the deprecation script, so I decided to refactor it. In case you don't like it, we can just revert the last commit.

@JanPetterMG JanPetterMG added this to the v2.3.0 milestone Feb 21, 2026
Copy link
Copy Markdown
Collaborator

@JanPetterMG JanPetterMG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the thorough iteration on this. The changes look solid, CI is green, and everything discussed has been addressed.

Approving and merging. 🚀

@JanPetterMG JanPetterMG merged commit 9774469 into VIPnytt:main Feb 21, 2026
145 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request firmware C++ related frontend Web app related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants