-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add Rotation and Typing #54
Conversation
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.
Thanks for working on this.
You're on the right track with many of the types but there are a few changes that can be made. Most of these are the same few things like Optional and return value tweaks but there are a few other sprinkled in as well.
Oof, that'll keep me busy. I didn't try to type init on purpose because I thought you couldn't type init's. Thank you for the review and the hints. I'm on it. In the mean time here's a nice demo of the rotation. 2024-04-02_05-07-09.mp4 |
I'm pretty sure I won't even get it on my 2nd attempt so might as well number them.
Note to self don't put pound symbols in commit titles. github formatted it to point at adafruit issue number 2. i don't know how to fix that. oh dear lord the amount of errors... pylint hates me. |
Making progress, cutting down the amount of errors.
🏳️ I Surrender. Pylint has defeated me. I defined ReadableBuffer in both typing and circuitpython_typing. Pylint won't recognize either of them. |
I can only conclude that ReadableBuffer does not exist in circuitpython_typing. |
There are now 4 ReadableBuffer errors instead of 1... So it was correctly setting 3 of them previously. |
I set it back and now there's only 1 ReadableBuffer error again... |
So I replaced the error on line 119 |
Nope, I'm not allowed to use ReadableBuffer or WriteableBuffer in any fashion. |
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.
The latest version of this is looking good to me.
Thank you for working through all of those changes @DJDevon3! I know it was quite specific and perhaps not the funnest coding task. I appreciate your work.
I took another look through everything in this branch and made 1 commit with a few additional tweaks for things I didn't see the first time through.
I tested the lastest version successfully on a Feather RP2040 9.0.4 with a CharlieWing using a modified simpletest to set some different pixels on and confirm behavior of the new rotation argument.
Updating https://github.com/adafruit/Adafruit_CircuitPython_BME680 to 3.7.5 from 3.7.4: > Merge pull request adafruit/Adafruit_CircuitPython_BME680#72 from FoamyGuy/displayio_example Updating https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731 to 3.4.0 from 3.3.11: > Merge pull request adafruit/Adafruit_CircuitPython_IS31FL3731#54 from DJDevon3/DJDevon3-IS31FL3731 Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 2.1.21 from 2.1.20: > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#54 from vladak/spelling_1 Updating https://github.com/adafruit/Adafruit_CircuitPython_NTP to 3.1.0 from 3.0.13: > Merge pull request adafruit/Adafruit_CircuitPython_NTP#32 from justmobilize/esp32spi-support Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
@FoamyGuy God bless you. Thank you. 🙏 Yes that was a struggle. I don't want to see pylint again until next year. |
Added new feature: ability to rotate display 0,90,180,270.
This will be particularly useful to arrange multiple charlieplexed matrixes together in any orientation for chaining. I don't think chaining multiple into 1 matrix is currently supported but it's a step in the right direction.
Added 16x9 charlieplex example that includes the new rotation feature.
"attempted" to add typing annotations... expect some to be wrong and that's ok, an attempt was made. i did not attempt to type every file. want to be sure i can do at least 1 correctly first then will do the other examples.
Rotation = 0 (hard to photograph because it's a scrolling marquee)
Rotation = 90