-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Is31pixelbuf #5726
Is31pixelbuf #5726
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.
Why does this need to be done in C? Can't write be done from Python alone?
I did it in C as I thought it would need it for speed (especially the mapping) and for coordination with the displayio work I did. I will do a test of C vs Python to see if it is required. Now that I understand how all the parts work doing it in Python may make sense. |
I didn't see any coordination here. Did I miss it? If it does need to be coordinated, then I'd expect it to be part of the existing object. It'd also be helpful if you'd link to the prototype library. Thanks! |
The python library (not yet merged upstream) https://github.com/gamblor21/Adafruit_CircuitPython_IS31FL3741/tree/native_changes I added a I did some testing to see if the It may be easiest to discuss this at the next CP meeting. |
@gamblor21 Sorry I wasn't at this weeks meeting. I took the day off. What did you conclude there? 2x speed-up seems worth it. |
I was checking with Kattni on the library end of things which looks good (it won't break the existing library on smaller boards). I'll clean up the code I have with the comments above and also submit the PR to the library so they can be looked at together. |
I see you pushed the library PR. Let me know when you'd like me to look at this and I will. Thanks! |
Both PRs are passing checks and I did a final check on my hardware here so should be good for reviews. |
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.
Thank you for the reorg. I like the separation you have between the IS31FL3741 and FrameBuffer classes! I just requested some doc updates to match. Thanks!
//| """Displays an in-memory framebuffer to a IS31FL3741 drive display.""" | ||
//| | ||
|
||
//| def __init__(self, *, width: int) -> None: |
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.
Update this please.
|
||
//| width: int | ||
//| """The width of the display, in pixels""" | ||
//| def is31fl3741_write(mapping: Tuple[int, ...], buf: ReadableBuffer) -> None: |
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.
//| def is31fl3741_write(mapping: Tuple[int, ...], buf: ReadableBuffer) -> None: | |
//| def write(mapping: Tuple[int, ...], buf: ReadableBuffer) -> None: |
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.
Very close! Just a typo and a question about kw_only required arguments.
Not sure why there was one cancelled check, but with the rest passing I don't think it is worth re-running the whole thing. |
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.
Sorry, two more minor things. I suggested conflicting changes to you before wrt the *
and kw_only. More folks are using the stubs so think it's worth correcting now.
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.
Thank you! This looks good. It just needs conflicts resolved and then will be good to go.
All the merge fixes are good. One build failed with a 403 error that doesn't seem related to the changes. |
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.
One spot where I think you want a write_read
.
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.
Looks good to me! Thank you!
Added new functions to the is31fl3741 module similar to
neopixel_write
but for is31fl3741 LEDs. Included an initialize function as well. These two functions are used with a yet to be submitted python library to use with with the adafruit_pixelbuf class.Also includes a small bug fix to the existing library and changes the map from
list
totuple
upon advice I was given. There are no libraries released that were lists so best to do so now.