-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[nextion] Merge upload tft engine in a single file #6670
Conversation
This is another try to merge the algorithms into a single file, as I've previously tried with esphome#6192, but this time in a more simplified way. The new file is the Arduino one with the modifications required by ESP-IDF. Although the #ifdef are not the best readable thing, it was just a couple of those new, so I believe this worth the change, as it makes way easier to maintain this code, reducing the need to repeat the changes on both files every time we want to make a change.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #6670 +/- ##
==========================================
+ Coverage 53.70% 54.15% +0.44%
==========================================
Files 50 50
Lines 9408 9575 +167
Branches 1654 1687 +33
==========================================
+ Hits 5053 5185 +132
- Misses 4056 4066 +10
- Partials 299 324 +25 ☔ View full report in Codecov by Sentry. |
Hey there @SenexCrenshaw, mind taking a look at this pull request as it has been labeled with an integration ( |
We are actually trying to do the opposite with other components. Trying to split files that are littered with |
Well, I see your point, but |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I am just fine with someone wanting to maintain the component =)
If it makes it easier for you, then combine them.
One thing I noticed is that the ifdefs should be USE_ARDUINO
, but also, it would be nice to use the idf based code on every esp32 regardless of framework, and then the Arduino code only for the other platforms that this supports like esp8266 etc.
I'm a big advocate of readability -- lots of |
Ok, I will find a better fit here and submit this again. |
Change it to esp32 vs esp8266 makes sense and will make it more relevant if we want to extend this to other platforms (rp2040, bk72xx, etc). |
It's nice if you care to do so, but as you are (presumably) doing this in your free/spare time, we're not going to hold you to that expectation. 😄 Others may appreciate it at some point, but how far you take it is up to you. Regardless, smaller, incremental changes are easier to review; keep that in mind as you continue your great work! 😄🍻 |
I would prefer you don't write code for platforms you don't use/test =) |
Testing is not the issue, as I believe I have all those devices here... just need time to connect the display and install ESPHome on those, but as Keith said, I'm doing this on my free time and that may not be the best use of it if no one is gonna use. I would prioritize the existing issues and feature requests around Nextion instead. 😉 |
About using the IDF engine for Arduino, it isn't that straightforward as Arduino didn't liked to use the ESP-IDF http client library. 😞
|
Curse you Arduino! Ok, you can switch it back to arduino vs esp-idf and I may take a look in the future |
Ok. This is how it is in
#6700 fixes that. 😃 |
What does this implement/fix?
This is another try to merge the algorithms into a single file, as I've previously tried with #6192, but this time in a more simplified way. The new file is the Arduino one with the modifications required by ESP-IDF. Although the #ifdef are not the best readable thing, it was just a couple of those new, so I believe this worth the change, as it makes way easier to maintain this code, reducing the need to repeat the changes on both files every time we want to make a change.
Types of changes
Related issue or feature (if applicable): N/A
Pull request in esphome-docs with documentation (if applicable): N/A
Test Environment
Example entry for
config.yaml
:N/A
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: