-
Notifications
You must be signed in to change notification settings - Fork 3k
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
FHSS timer: Use singleton pointer #9579
Conversation
@kjbracey-arm Can I use singletonptr from array. Seems to work ok with array size of 2. |
Yes, it's fine to enclose a SingletonPtr as a member of any other static object. That would only be useful if that static object then becomes a simple object - ie it has no explicit constructor, and its default constructor now has nothing to do because none of its members have explicit constructors - all its complex C++ members are SingletonPtr-wrapped. |
I'm curious. Why was this change needed? All I'm able to find is that a change was made, not why. |
CI started |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
can you add this to the commit msg ? what is this addressing. |
@kjbracey-arm Can you educate us regarding singletonptr? |
It prevents the static objects always being included in a build. Without the If you have any top-level static C++ objects with constructors, wrapping them in Tests should have flagged a blinky size increase when those objects were first added. |
This is to save statically allocated memory. Without SingletonPtr the timer objects would always be included in build.
676d619
to
17e4e28
Compare
Thanks Kevin! I updated the commit message. |
CI started |
Test run: FAILEDSummary: 1 of 12 test jobs failed Failed test jobs:
|
restarted |
Description
Use singleton pointer with FHSS timer.
Pull request type
Reviewers