aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/Navigation.h
Commit message (Collapse)AuthorAgeFilesLines
* navigation: fix greying out the app icon if not enabledHeiko Stuebner2025-07-031-0/+4
| | | | | | | | | | | | | | | | Commit 0aead42fdf51 ("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 63e0c4f4efb0 ("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.
* Watch face selection with CMakeJean-François Milants2023-12-231-1/+1
| | | | Move displayapp/Apps.h into a header only library (to make the integration easier in InfiniSim.
* Fix code formattingJean-François Milants2023-11-191-0/+2
|
* Application selection at build timeJean-François Milants2023-11-191-0/+11
| | | | | | | A list of "user applications" is built at compile time. It contains all the info needed to create the application at runtime (ptr to a create() function) and to display the app in the application menu. All applications declare a TypeTrait with these information. When a new app must be loaded, DisplayApp first check if this app is a System app (in which case it creates it like it did before). If it's not a System app, it looks for the app in the list of User applications and creates it if it found it. Those changes allow to more easily add new app and to select which app must be built into the firmware. Switch to C++20 (and fix a few issues in SpiMaster.cpp and Watchdog.cpp.
* navigation: Add is available (#1847)JF2023-09-021-0/+2
| | | | | 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.
* navigation: Move font to external memory (#1838)JF2023-09-021-2/+2
| | | | | | | | | | 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.
* screens: Remove unused DisplayApp parametersRiku Isokoski2023-02-251-1/+1
|
* Update includes to to be relative to src directoryReinhold Gschweicher2021-11-151-1/+1
| | | | | | | Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
* Refresh reworkRiku Isokoski2021-07-191-1/+3
|
* Navigation app: reduce memory usage (#362)JF0022021-06-011-97/+4
| | | | | | | * Navigation app: - Renaming and reformatting according to coding conventions - declare iconMap as constexpr and use char* instead of std::string This reduces the flash usage from 424644B to 419344B (-5300B)!
* Changed access modified indentationAvamander2021-04-241-2/+2
|
* Reformatted all the files according to clang-format styleAvamander2021-04-241-100/+98
|
* Big UI and navigation RewriteJoaquim2021-04-041-180/+92
| | | | | | | | | | | new navigation add some color to the apps redesign menus new settings menu new quick settings code clean up size reduction by converting navigation images to font and more...
* Merge branch piggz/nav into develop:Jean-François Milants2021-01-201-0/+238
- fix conflict - add a icon for the navigation app.