-
-
Notifications
You must be signed in to change notification settings - Fork 86
Refactor and optimize Ethernet library #357
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
Conversation
Code cleanup, standardize formatting, added nullptr checks to help stability, reorganized to eliminate local variables to save stack space.
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.
could you please move configureStaticIP
bellow the begin
which had that code so it is compared in the diff
Yes, sorry. I got side-tracked adding those annoying /------ ... --/s |
Moved function `configureStaticIP` to the end for (hopefully) proper diff alignment.
I will go hunt through the libraries/Wifi/Examples and update as needed to get things moving. I feel like I'm going to end up porting all of the newer WiFi code over to Arduino. |
you forgot to commit Ethernet.h? and please try to eliminate unnecessary differences |
I will do that, there is no "Ethernet.h" in the original directory, so I did not think to include it. |
I'm going to close this until I work out the bugs. Thank you, initially my local repo didn't have Ethernet cloned into it and I was going off the web version, however, with the new update, I cannot submit this as is. Cheers |
Using
const
liberally so that the compiler can try to optimize this down a bit more.I put in a couple nullptr checks to help stability as I've had my controller crash, hopefully this helps someone.
I created a
configure_static_ip
function so thatint CEthernet::begin ...
can remain function specific.Set
ni
to a nullptr to avoid any potential "use after free" issues.