Skip to content
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

Syntactical rewrite using C++ templates to avoid heap fragmentation #17

Merged
merged 5 commits into from Dec 20, 2019

Conversation

@lathoub
Copy link
Contributor

lathoub commented Oct 26, 2019

lathoub added 2 commits Oct 26, 2019
- avoid using free/malloc as it causes heap fragmentation and crashes long term (https://arduino.stackexchange.com/questions/682/is-using-malloc-and-free-a-really-bad-idea-on-arduino/712) when repeatedly calling constructor/destructor (this modif avoids that)
- use uint8_t in stead of int (saving memory)
@Simsso Simsso self-requested a review Nov 6, 2019
@Simsso Simsso changed the title syntactical rewrite using c++ templates to avoid heap fragmentation Syntactical rewrite using c++ templates to avoid heap fragmentation Nov 6, 2019
@Simsso

This comment has been minimized.

Copy link
Owner

Simsso commented Nov 6, 2019

Thank you very much for contributing. I'll review the PR within the next weeks once I have access to hardware to test it.

Copy link
Owner

Simsso left a comment

Thanks a lot of opening this PR. The changes you have made do not only extend the functionality but also improve the coding style. That's really greatly appreciated. I'll run a test on hardware now. As far as the feedback is concerned: I've got one question about the variable casing and some smaller fixes that I will make myself.

src/ShiftRegister74HC595.h Outdated Show resolved Hide resolved
src/ShiftRegister74HC595.h Show resolved Hide resolved
src/ShiftRegister74HC595.hpp Outdated Show resolved Hide resolved
src/ShiftRegister74HC595.hpp Outdated Show resolved Hide resolved
Simsso added 2 commits Dec 20, 2019
@Simsso Simsso self-assigned this Dec 20, 2019
@Simsso Simsso added the enhancement label Dec 20, 2019
@Simsso Simsso changed the title Syntactical rewrite using c++ templates to avoid heap fragmentation Syntactical rewrite using C++ templates to avoid heap fragmentation Dec 20, 2019
@Simsso
Simsso approved these changes Dec 20, 2019
@Simsso Simsso merged commit cd2ae50 into Simsso:master Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.