-
Notifications
You must be signed in to change notification settings - Fork 66
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
Flash optimizations #260
Flash optimizations #260
Conversation
Firmware for this pull request: |
Firmware for this pull request: |
Firmware for this pull request: |
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.
Looking good. Thanks!
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.
There is one byte
that we want to change to uint8_t
so that it is perfect.
Firmware for this pull request: |
Firmware for this pull request: |
Firmware for this pull request: |
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!
Description of changes
I went a couple of times through all functions, not much I found to optimize the Flash usage.
Overall this results in 1690 bytes less of Flash usage and 43 bytes less of RAM usage.
One important remark
I have deleted the usage of UniqueID for all AVR Boards. There was only less time where this was used. If a board was initialized in this timeframe, a new serial number will be generated with this change. I guess there are only verly less user who are affected, not to say no user is affected.
I vote to take now the chance to get rid of these serial numbers to not deal with them in the future.
If we should still keep them, I will add again the detection but without using the sprintf() function to take care of the huge flash saving.
@MobiFlight-Admin @neilenns @GioCC may I ask you to comment on this and to add ideas/changes for further reducing of Flash/RAM usage.