Watch face selection at build time #1926
Merged
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.
This PR allows to select which watch faces will be built into the firmware at build time. This is done in a similar way than in #1894 : a list of watch face descriptions is generated at build time (using
constexpr
/consteval
and template meta programming). This list is then used at run time to build the setting menu and to load the watchface when requested by the user.Using this PR together with #1894 (which is already merged), it is now possible to build a bare minimum firmware with no user app and a single watchface. This reduces the image size from 377KB (79%) down to 311KB (65%) in flash memory.