-
Notifications
You must be signed in to change notification settings - Fork 288
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
Adding drivers for EPDiy supported parallel epapers #75
base: master
Are you sure you want to change the base?
Conversation
…per#2 Flushing too often, drawing only 40 px on top of display
…not epdiy_cale.cpp
…tly to the framebuffer
…o update only the part that is updated. Still buggy but working version
…l nibble per row check since this is done already by LVGL#
…h updateMode enum
Hello @martinberlin , |
Thanks @tore-espressif for your review. Short proof-of-concept video of ESP32 with LVGL sliders, that on change value, are used to control ESP-MESH Lights |
Not a codereview, but just for clarification:
LVGL is released under MIT license which allows commercial use, so these licenses are incompatible. |
Exactly like you assumed. Epdiy can be added as an external component. I collaborated with EPDiy library adding software rotation, and what I suggest is to use this forked EPDiy that has just the base library, and not any examples (Like weather) The reason is to keep the size smaller and also because is the right way to add an ESP-IDF component directly with the files in the main directory. I guess the EPDiy main repository could be also used, but I really don't know what is the way to tell IDF that the component files are in subdirectories. So yes I confirm everything I posted in this PR is my work. It needs an additional component that was programmed by @vroland and has another license. If the C files are added in CMakeLists this won't compile with the additional library. My proposal is to leave this files commented in CMakeLists so it's optional only for those that want to use it. |
Pelease merge this PR, we really need it. |
@tore-espressif @kisvegabor Can we review the license situation on this PR? |
AFAIK, you can't use GPL in MIT projects because MIT would remove obligations stated in GPL. |
Agreed, IIRC that's the reason we didn't merge it back in summer :( |
Hello @kisvegabor and @tore-espressif
Read in EPDiy project: Firmware and remaining examples are licensed under the terms of the GNU GPL version 3. Utilities are licensed under the terms of the MIT license.
In my proposal, I'm not adding this copying the file, but is dynamically linked as a submodule: Question: Even if EPDiy project owner gives his permission, and this is dynamically linked as a submodule, is not possible that this 2 components coexist just because they use different Licenses? |
I am not a lawyer, so this is just my understanding of the situation. The way EPDiy is included in the source tree is a separate topic from the question of dynamic linking and licensing. Having a GPL submodule is probably acceptable if there's a clear disclaimer on the repository. However, it's not very helpful to someone actually intending to use it in an MIT project, because whether the source is downloaded separately by GitHub or not, the final binary still includes GPL code, which means that all other code in the binary also has to be distributed under the terms of the GPL. For this reason it's generally easiest to entirely avoid (L)GPL code in these types of situations. GPL contaminates the rest of the binary no matter what, and while LGPL has largely solved the problem for higher-level languages and ecosystems, it isn't much help for embedded where static linking is still the norm. LGPL requires the user to be able to replace the LGPL component of the code if they desire, which isn't practical in most embedded applications. Still, I'd hate to see this effort go to waste. Does anyone know if it's possible to get CMake to conditionally download and extract a tarball at build time? That would avoid the issue of users inadvertently using a GPLed submodule without being aware of the ramifications. They would have to turn on the config option first and a warning could be printed advising them that GPL code is being included. |
I'm not sure of CMake can do that. We can search tho. My concern would be that the drivers repo is under cleanup and we might need to rework this. |
Dynamically linked means using a DLL on Windows or an SO file on Linux. This way the DLL or SO file not built "statically" into the binary, just placed next to it and "dynamically" loaded in runtime.
The ExternalProject_Add could do that. |
I just noticed there is an Issue on epdiy where is suggested that if all contributors accept, the License could be moved to LGPL. If I see that clear, then we won't have this problem with GPL v3 vs MIT |
LGPL improves the situation but still requires some sort of dynamic linking on the target platform, or the ability for a user of the product to rebuild the firmware with a different version of the LGPL component. |
Only for your information: EPDiy has updated their license to Lesser GPL |
@embeddedt Will this be merged? |
The question of linking/licensing still needs to be resolved. From my perspective, we can't include LGPL code in this repository without some sort of prominent disclaimer, since dynamic linking isn't common on embedded platforms. |
@embeddedt Thanks for reply, new try: vroland/epdiy#174 |
I found some time to update this using the new epdiy V7 board which uses esp32-S3 and fast SPI external RAM (Octal at 80 Mhz) There are some issues to make this work faster:
I asked also for a GT911 touch panel which is already supported in LVGL. Then we can try to optimize more. |
The main contribution is to add a bridge driver to support EPDiy parallel epapers please check the table in that repository.
My post in LVGL Forum where I got help and guidance to achieve this.
Please note that EPDiy requires a special PCB that is available in their repository. As an exception Lilygo has EPD47 that is an epaper available with it's touch component for about 49u$ in Aliexpress (Touch is L58 also in this pull request)
Additionally I'm also adding support to other SPI epapers, like the big 12.48 inches from Waveshare, and others that are 3 or 7 colors with my component Cale-idf. But that's just an extra since SPI are too slow for me to use them for UX, I really like how it works with parallel epapers so far.
Please tell me any part that I should correct. For example my library Cale-idf needs CPP but epdiy does not need it, so I could just change it to plain C.
UPDATE: I think it makes sense to add only EPDiy on this update so it's focused only on fast parallel epapers that can be used for UX. I will clean it up on the next days but hopefully it serves like it is to make further corrections.