Open
Conversation
Author
|
So any update on this...... |
Contributor
|
It looks like the storage is allocated in the constructor and deallocated in the destructor. Are you constructing/destructing over and over again, or just once and your ran out of heap? Did you shared the buffer between multiple instances to avoid that? It would be good to pass the length of the buffer and validate that it's at least as big as what's required. |
Author
|
Hello, thank you for getting back. I haven't look at the code in awhile so will need to check and get back to you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added in provision to incorporate the use of static arrays for LEDs. I was working on a project that used 11 different strips of Neo pixels (this was the 144 LED/m where it is recommended to use only 1 meter at a time). Since I used 11 strips, I needed 11 different instances of the Adafruit class and with this being dynamic memory on a MCU, this killed my heap. Even the ESP32 had a hard time.
But, once I removed the dynamic aspect from the library, everything worked. This code will be valuable to those that use more then 1 strip. I also have default arguments to be backward compatible with existing code.