InfiniTimeOrg / InfiniTimeOrg/InfiniTime
Consolidate common watch face code
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I'm thinking about refactoring the common parts of WatchFaceDigital and WatchFaceAnalog into a common base class. This should help reduce overall code size a little by eliminating duplicated code for similar functionality and make it easier for people to create new watch faces since they can start with some core features and not need to re-implement them themselves.
Everything related to drawing the watch face would be left up to the derived classes since that's the main thing that distinguishes them. The state management for things like date/time, battery charge level, BLE status, notifications, etc. would be provided by the base class.
Just looking for feedback on whether or not this seems worthwhile.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating WatchFaceDigital and WatchFaceAnalog and comparing their duplicated state-management code for date/time, battery, BLE status, and notifications. Any completed refactor would need a common base for that state while leaving watch-face drawing in the derived classes, but the issue currently requests feedback rather than defining an implementation task.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100