WIP: try (re)using the buffer in neopixel_write (BROKEN)#2449
WIP: try (re)using the buffer in neopixel_write (BROKEN)#2449tannewt merged 4 commits intoadafruit:masterfrom
Conversation
There was a problem hiding this comment.
Thank you! Why is PewPew also being update?
There was a problem hiding this comment.
| if (pattern_on_heap) { | |
| if (pixels_pattern_heap_size < pattern_size) { |
There was a problem hiding this comment.
Fixed the submodule and addressed this review.
There was a problem hiding this comment.
Please make sure that this is reset to NULL when the heap is reset otherwise it'll break after a reload.
There was a problem hiding this comment.
I'd add a neopixel_write_reset and add it here: https://github.com/adafruit/circuitpython/blob/master/main.c#L190
There was a problem hiding this comment.
I added the neopixel_write_reset to the port only, as this is only for nrf. I called it from reset_port().
There was a problem hiding this comment.
Feel free to stub it into other ports if that is simpler. I wouldn't be surprised if others needed it in the future.
ed288d9 to
bf184d8
Compare
bf184d8 to
4e040b0
Compare
|
The board seems to be resetting on me after this change - hold tight for more testing. |
|
@rhooper I am going to try to finish this off, since we should fix #2442 for 5.0.0. When you say:
|
|
@rhooper I am going to try to finish this off, since we should fix #2442 for 5.0.0. When you say:
|
|
@dhalbert the old version of this PR (34c9e00) didn't clean up on reset. so I tried to do so like @tannewt requested in later commits. That resulted in crashes - I don't quit recall when. To test for the soft reset without the patch, the simplest approach was to have large neopixel_write intermixed and other code. For example the stuff the tree code did with AggregatePixels in adafruit/Adafruit_CircuitPython_LED_Animation#10 . No pixels needed to be attached. The tree code triggered it faster by fragmenting memory. |
This might address #2442
I'll leave it running overnight.