-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add is available to navigation app #1847
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
Conversation
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
The TTF font used by the navigation app is ~20KB and is stored in internal flash memory. To free this space, the TTF font is now converted in 2 "atlas pictures" (pictures that contain multiple concatenated images) stored in the external flash memory. The navigation app now accesses one of those 2 files and apply an offset to display the desired picture. The corresponding documentation has also been updated.
Fix formatting.
Add comments about the layout of the pictures that contain the icon and about the indexing of those icons.
In documentation (buildAndProgram.md), edit the section about the debug compilation mode. Remove the part about removing the Navigation app to free some memory (since it's not relevant anymore) and explain how to selectively build parts of the firmware in Debug mode.
Navigation app now needs 2 images to be loaded from the resources on the external filesystem. This PR adds an 'enabled' field to the Applications struct. This field is true for all applications expect for Navigation which calls Navigation::IsAvailable(). This methods returns true if the 2 files are available in the resources. The application list disables the application (draws it in grey, disables the touch callback) if the enable flag is not set.
|
Build size and comparison to main:
|
FintasticMan
approved these changes
Sep 2, 2023
Member
FintasticMan
left a comment
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.
Looks good!
Zetabite
pushed a commit
to Zetabite/InfiniTime
that referenced
this pull request
Nov 12, 2023
Navigation app now needs 2 images to be loaded from the resources on the external filesystem. This PR adds an 'enabled' field to the Applications struct. This field is true for all applications expect for Navigation which calls Navigation::IsAvailable(). This methods returns true if the 2 files are available in the resources. The application list disables the application (draws it in grey, disables the touch callback) if the enable flag is not set.
mmind
pushed a commit
to mmind/InfiniTime
that referenced
this pull request
May 25, 2025
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } As right now only the Navigation app is using this, fix the issue by just checking the already existing Navigation's IsAvailable method when its icon is getting added.
mmind
pushed a commit
to mmind/InfiniTime
that referenced
this pull request
May 27, 2025
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } As right now only the Navigation app is using this, fix the issue by just checking the already existing Navigation's IsAvailable method when its icon is getting added.
mmind
pushed a commit
to mmind/InfiniTime
that referenced
this pull request
May 29, 2025
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } As right now only the Navigation app is using this, fix the issue by just checking the already existing Navigation's IsAvailable method when its icon is getting added.
mmind
pushed a commit
to mmind/InfiniTime
that referenced
this pull request
May 29, 2025
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } As right now only the Navigation app is using this, fix the issue by just checking the already existing Navigation's IsAvailable method when its icon is getting added.
mmind
pushed a commit
to mmind/InfiniTime
that referenced
this pull request
Jun 1, 2025
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } Fix this by creating an isAvailable() strcuture in the app classes, similar to how the Watchfaces handle the same problem of checking availability.
mmind
pushed a commit
to mmind/InfiniTime
that referenced
this pull request
Jul 2, 2025
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } Fix this by creating an isAvailable() strcuture in the app classes, similar to how the Watchfaces handle the same problem of checking availability.
mmind
pushed a commit
to mmind/InfiniTime
that referenced
this pull request
Jul 2, 2025
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } Fix this by creating an isAvailable() strcuture in the app classes, similar to how the Watchfaces handle the same problem of checking availability.
mark9064
pushed a commit
that referenced
this pull request
Jul 3, 2025
Commit 0aead42 ("navigation: Add is available (#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } Fix this by creating an isAvailable() strcuture in the app classes, similar to how the Watchfaces handle the same problem of checking availability.
tmaklin
pushed a commit
to tmaklin/InfiniTime
that referenced
this pull request
Jul 31, 2025
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing. Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true: for (const auto& userApp : userApps) { apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true}; } Fix this by creating an isAvailable() strcuture in the app classes, similar to how the Watchfaces handle the same problem of checking availability.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add
IsAvailable()to Navigation AppNavigation app now (since #1838) needs 2 images to be loaded from the resources on the external filesystem. This PR adds an
enabledfield to the Applications struct. This field is true for all applications expect for Navigation which callsNavigation::IsAvailable(). This methods returns true if the 2 files are available in the resources.The application list disables the application (draws it in grey, disables the touch callback) if the enable flag is not set.
This implementation is similar than the one used by the Watchface Setting app.
Here is the result from the devkit and InfiniSim :