-
Notifications
You must be signed in to change notification settings - Fork 3
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
Have one interface per state machine #184
base: master
Are you sure you want to change the base?
Conversation
2c6b5a0
to
3ce8922
Compare
3ce8922
to
34d9c4c
Compare
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.
What a dream <3 Good stuff, thanks!
- #if
- #endif
What do you think of using cfg/ini files or cli args instead of defines in the future?
That way we could cut down even futher on using #ifdef USE_XXXX
and even #define INTERFACE SomeInterface
and that would also help to solve #142
Maybe? The thing with cfg/ini files is that they are parsed at runtime. Ideally, all those things should be figured out at compile time in some way. This produces a single binary, prevents runtime issues, and allows the compiler to optimize away unneeded stuff. Right now, my main goal is to reduce preprocessor flags to a more manageable level. I believe having a small amount of |
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 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.
That's weird 🤔 nevermind then...
So I've gone ahead and split the interface to be per state machine. In short:
More refactoring/changes can still be done. However, those will probably be reserved for other PRs:
HotFireState
instead ofStateData
)TestingInterface
and add the testing code toInterface.h
This is related to changes discussed here: https://avwiki.uorocketry.ca/en/Avionics/Software/Proposals/Interface-Overhaul. I figured no matter the direction we decide to take (async vs sync), we need one way or another to do this change.