-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Optional apps #1408
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
Optional apps #1408
Conversation
|
Maybe remove the SLOTS_FREE calculation. I don't think you need it. Let's say you tell InfiniTime to make an app screen with 3 pages, and 14 apps. That gives you 4 empty slots. You are manually adding Apps:none in each of these empty slots. I don't think you need to do that. In my Infinitime build I have 14 apps, and the empty slots just show up as gray squares on my watch automatically. |
|
Its easier and works 😊 Thank you very much! |
|
Ok, I think I got it. Works fine for me, the screen count bug seems to be gone. I cannot see what the problem with the formatting is and does not solve it. |
|
@minacode Thank you for your work on this feature, and my apologies for not giving any feedback until now. I've had this kind of feature in the back of my head for a while now, but I haven't had the opportunity to think about it yet. I had a quick look at your work : your PRs well documented, easy to read and they focus on a single functionality, good job! I noticed that this PR uses Could another design allow to avoid using The maintainability of this feature is another concern to me. I guess the final goal of this feature is to add more applications in the InfiniTime codebase than what the hardware is capable of (most because of RAM/FLASH constraints). This way, users will be able to easily build the firmware that contains only the apps they need. My concerns are multiple:
This functionality (together with adding more apps) will require more and more maintenance work from maintainers. The global quality of the project might also decrease because not everything will be tested enough. Have you already thought about that? What's your opinion? |
Don't worry and thank you for taking a look at it.
I am completely open to any idea. The main reason I started it was because I thought it would be good if someone did something, so I did. It's always easier to have a discussion when there is already something. This PR is just a simple proof-of-concept. Edit about what I found out since writing this:
Yes, exactly. People come here with apps that cannot easily reach other users because we cannot merge them. This PR frees the code base from those memory constraints.
I thought about this and this is my rough take:
This is true but still better than no apps. And in the future with loadable third-party apps we will have no control about app quality at all.
The complexity would grow, that is true. I don't want to tell anyone that we can/should/will do more than is done right now, so I don't know about the rise in maintenance. One more radical idea I had is to split the code base in a core repo and a repo only for apps and have more maintainers for the apps to improve the situation without the core development going out of control. |
08d4292 to
1b77408
Compare
|
@JF002, is it problematic to build this PR on C++17/20 features? (Aside from the discussion about where this all is headed anyways...) I removed most of the preprocessor now. Edit: I need |
|
Right now, there are still the global
|
|
If this PR uses C++17/20 features, I would say you should change |
|
I don't think requiring changes in even more places just to add an app is a good idea. It'll make issue #1571 worse. |
|
I agree. The question is: can we have both optional apps and less places where apps have to be added? |
|
That's what #1571 is for. It'll probably require a lot of refactoring. |
This is another attempt to optional apps (issue #1114). My first one is #1296.
It is finished and review from anyone would be appreciated.
In this second approach I tried to cut out apps without adding another build step, so I ommitted the Python script. This means that all of it is done via the preprocessor.
The core of it all is
src/displayapp/AvailableApps.hwhere theAPP_Xvariables are defined. Their values determine how many slots in the main menu they occupy.0means the app is not included.1means the app is included and takes one slot in the menu. Higher values are possible.Some apps are closely tied to the system and can not be removed.
Can be removed: Music, Metronome, Pong, Twos, Navigation, Paint, Motion
Cannot be removed: Timer, Alarm, Stopwatch, Heartrate, Steps
Most of the magic happens in
src/displayapp/screens/ApplicationList.h.The number of screens is calculated from the
APP_Xvariables now.