Abstraction branch (making software easy to customize) #17
Replies: 14 comments 20 replies
-
Hi, yeah, the UI would never run this fast without LVGL. So that would be one of the main components of the software that I want to keep. |
Beta Was this translation helpful? Give feedback.
-
Awesome as long as we are 100% set on LVGL I think we can build the Hardware Abstraction layer with that dependency in mind. My pull request that allows UI to be shared it coming along but it will be good to talk about what our hardware abstraction interface needs to have. |
Beta Was this translation helpful? Give feedback.
-
Just adding some appreciation for integrating the LVGL more directly into platformio. I'm still learning how to use LVGL and have components about to drop on my doorstep, but removing steps for end users to create their own UI will be a huge benefit. |
Beta Was this translation helpful? Give feedback.
-
Figured I could high Jack this thread to talk about the abstraction of the code and allow people to weigh in on my current design. |
Beta Was this translation helpful? Give feedback.
-
@MatthewColvin I still have some questions about your implementation:
I'm still wondering what the best way for easier customization would be. Maybe some sort of json config file that's loaded into the SPIFF? |
Beta Was this translation helpful? Give feedback.
-
Hey @CoretechR,
My thought was that we have a hybrid of sorts where the maintainers focus on the HardwareInterface and then allow the end user to use that HardwareInterface inside their custom LVGL code (OmoteUI). I still have a bit of work to get that HardwareInterface into a place that would make good use of the hardware. But we may not want to assume that amount of coding knowledge?
After I flush out the HardwareInterface the steps to customize would look something like this
Might be good for us to talk sometime so I can kinda get an idea of where you want this to go. |
Beta Was this translation helpful? Give feedback.
-
abstraction...MatthewColvin:OMOTE:RefineAndImplementHardwareInterface Current work on that interface. |
Beta Was this translation helpful? Give feedback.
-
On the subject of full-code vs no-code GUI customisation, just an example the ESPHome-gui project are using YAML to define the layout and contents of an LVGL GUI as a bit of a middle ground, you describe your GUI components in YAML with simple blocks with basic customisation and tag them with whatever their function is, this requires something to interpret (in this case I think it's just some python) and piece together blocks of pre-defined LVGL code with limited customisability but it could work in this situation. Limiting the GUI to a selection of pre-defined blocks makes it less configurable (unless people want to tinker with the raw LVGL) but it is much easier than building some kind of graphical GUI builder from the ground up with the LVGL simulator at its heart. A GUI for this product would likely comprise of only a few fixed parts for most users, a settings page more or less hardcoded, then a small number of device pages with simple arrangements likely just 3x4 button grids, with blank buttons being hidden, just that one layout option allows for numpads, D-pads, transport controls, input selections etc, all with one predefined layout. That keeps the interpreter code fairly simple. just that on it's own would cover 90% of users needs before you get into home automation control with sliders and toggles, or display readouts for sensors etc. |
Beta Was this translation helpful? Give feedback.
-
Hi @MatthewColvin , I tried to get your branch running, especially the simulator. I'm using Windows. Is this the branch to use? https://github.com/MatthewColvin/OMOTE/tree/halloween I installed
This put SDL2 into
In plaformio.ini I activated env x64_sim I had to change
to
Now the compiler doesn't find everything Arduino related (Arduino.h, esp_now.h, ...) Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hey @CoretechR, With the decision to continue forward with @KlausMu branch as the main line would you like to keep the abstraction branch for people who may want a OO approach to GUI customization or just go ahead and drop it? I think @KlausMu is open to ingesting the HAL into his code which will allow SIM to run the same LVGL GUI code but that will not be a clean merge by any means lol. Probably better off just working it in manually. |
Beta Was this translation helpful? Give feedback.
-
Hey @KlausMu and @CoretechR I saw a comment on another ticket with the abstraction branch and some confusion on which branch. |
Beta Was this translation helpful? Give feedback.
-
I like the idea of renaming the branch. I think the most important thing about the branch is that it is heavily using classes. A lot of things can be abstract. Non OO code can be abstract. And OO code can be non abstract. So I think the name "abstraction" is not precise enough. And then in the README a comment about what this branch is for and what the difference to the main branch is
|
Beta Was this translation helpful? Give feedback.
-
@MatthewColvin |
Beta Was this translation helpful? Give feedback.
-
Branch was renamed to "OOmote C++ for Omote" Please see if you like the updated README: For renaming, I followed this guide: If you already have a local clone of the repository, you might want to do some or all of the following commands (some of them might not work, depending on how your local clone looks like):
|
Beta Was this translation helpful? Give feedback.
-
@CoretechR Did you plan for LVGL to be the long term solution I see you talking about a webserver on the esp to allow modification of the UI which sounds user friendly and easy and I was wondering if LVGL will be able to support this.
Beta Was this translation helpful? Give feedback.
All reactions