-
Notifications
You must be signed in to change notification settings - Fork 12
Add tft 3.5 inch featherwing helper #68
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
Conversation
The newest commit includes a refactor to the I tested these latest changes using an RP2040 Feather with the KeyboardFeatherwing and the keyboard featherwing test script from the examples directory. There is still one dupe section in the matrix_featherwing and pixelmatrix. As well as one outstanding PyLint issue in the RTC Featherwing. I can try to fix those up tonight, but I'm not sure if I have hardware to test on. |
@kattni please look at code dup CI issue |
@FoamyGuy We're going to either increase the threshold or disable the duplicate code check. I need to decide which. You will not need to resolve the issue with the modules you did not update. |
@kattni whoops I missed the last message until I came back here after pushing. I did end up refactoring the other helper classes and fix up the other last pylint issue in the rtc one. |
The latest commit refactors pixelmatrix and matrix_featherwing to make use of a new The one before that fixes up the last remaining pylint issue from rtc by returning None after the error is caught. I tested the refactored class changes with Feather RP2040 and https://www.adafruit.com/product/3149 / https://www.adafruit.com/product/2945 using the simpletest scripts in the examples directory and everything seemed to be working. |
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.
Style-wise this looks great. I didn't test.
@jedgarpark can u test since its in your wheelhouse? |
Talking with @jedgarpark on this a bit one thing we've seen is some devices / versions of CircuitPython seem to have an issue where the touch driver chip is not quite ready to be initialized when It results in this error:
We've figured out that adding a small I'm going to add some logic into the library module to try to catch the first one of these errors and retry once with a short time delay. This way the user won't have to worry about those details. |
@FoamyGuy I can test this |
@FoamyGuy That fixes the hang for me on both the example code and the Touch Deck code, great stuff! |
Fixed the hard crash I was seeing on |
Thank you @makermelissa for review, and @jedgarpark + @rsbohn for testing! |
Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout to 1.5.1 from 1.4.0: > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_Layout#21 from FoamyGuy/remove_print > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_Layout#20 from FoamyGuy/fix_setup_py > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing to 1.14.0 from 1.13.4: > Merge pull request adafruit/Adafruit_CircuitPython_FeatherWing#68 from FoamyGuy/add_tft_3_5_inch > "Increase duplicate code check threshold "
This adds a new helper class and example for the 3.5" Featherwing device. This can be used by the Touch Deck project code to remove the need for much of the display and touchscreen setup boilerplate code.
Unfortunately I don't think it is going to be passing actions currently. Due to code duplication
I refactored the existing tft_featherwing_24 class to use a new base class that it can share with the new tft_featherwing_35 added in this PR.
But there are still some duplicate sections between other previously existing helper classes for the keyboard_featherwing, as well as some for matrix_featherwing and pixelmatrix.
I tested these changes with a Feather RP2040 on the 3.5" and 2.4" Featherwings using the simpletest scripts and the current Touch Deck code: https://github.com/FoamyGuy/Touch_Deck_Working_Files