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

C++ State Machine Library #56

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

C++ State Machine Library #56

wants to merge 28 commits into from

Conversation

jbrhm
Copy link
Contributor

@jbrhm jbrhm commented Nov 25, 2024

Summary

Closes #34

What features did you add, bugs did you fix, etc?
Added a C++ State Machine Library

Did you add documentation to the wiki?

No

How was this code tested?

Created a test state machine with two states which had non-trivial constructors. They then transitioned between themselves. Made sure all of the static asserts caught invalid states. Updated visualizer.py to interface with multiple state publishers.

Did you test this in sim?

No, sim is not explicitly involved in a state machine

Did you test this on the rover?

No, the rover is not explicitly involved in a state machine

Did you add unit tests?

No

@jbrhm jbrhm self-assigned this Nov 25, 2024
state_machine/state.hpp Outdated Show resolved Hide resolved
state_machine/state_machine.hpp Outdated Show resolved Hide resolved
state_machine/state_machine.hpp Outdated Show resolved Hide resolved
state_machine/state_publisher_server.hpp Outdated Show resolved Hide resolved
state_machine/state_publisher_server.hpp Outdated Show resolved Hide resolved

std::vector<std::reference_wrapper<std::type_info const>> types{std::ref(typeid(To))...};
for(auto const& type : types){
demangledName = abi::__cxa_demangle(type.get().name(), nullptr, nullptr, &status);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its c++filt... but in C++ 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create C++ State Lib for Letter Detection
3 participants