Skip to content
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

Add is available to navigation app #1847

Merged
merged 5 commits into from
Sep 2, 2023

Conversation

JF002
Copy link
Collaborator

@JF002 JF002 commented Sep 2, 2023

Add IsAvailable() to Navigation App

Navigation app now (since #1838) 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.

This implementation is similar than the one used by the Watchface Setting app.

Here is the result from the devkit and InfiniSim :

InfiniSim_2023-09-02_161026
image

JF002 added 5 commits August 20, 2023 20:59
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.
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.
@github-actions
Copy link

github-actions bot commented Sep 2, 2023

Build size and comparison to main:

Section Size Difference
text 376768B -19188B
data 940B -56B
bss 63420B 0B

Copy link
Member

@FintasticMan FintasticMan left a comment

Choose a reason for hiding this comment

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

Looks good!

@FintasticMan FintasticMan merged commit 0aead42 into main Sep 2, 2023
6 of 7 checks passed
@FintasticMan FintasticMan deleted the add-is-available-to-navigation-app branch September 2, 2023 17:43
@FintasticMan FintasticMan added this to the 1.14.0 milestone Sep 18, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants