InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.64k stars 903 forks source link

Add is available to navigation app #1847

Closed JF002 closed 10 months ago

JF002 commented 10 months ago

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

github-actions[bot] commented 10 months ago
Build size and comparison to main: Section Size Difference
text 376768B -19188B
data 940B -56B
bss 63420B 0B