-
Notifications
You must be signed in to change notification settings - Fork 111
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
PrimaryClient: Add methods to unlock protective stop and stop the program #292
PrimaryClient: Add methods to unlock protective stop and stop the program #292
Conversation
14a30d6
to
c04b302
Compare
I moved the test modification to an own PR #293. Let's merge that first. |
9037e1e
to
d36121a
Compare
src/primary/primary_client.cpp
Outdated
} | ||
} | ||
|
||
void PrimaryClient::commandStop(const bool already_stopped_ok, const bool validate, |
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.
I am not sure that it is obvious what the arguments mean. Special the 'validate', another name suggestion could be "blocking"
I would be fine with that but then I would update that in all methods.
In addition, the functionality of already_stopped_ok might be challeging with a program that finish within 100ms inteval that the primary interface is updating the with. An example of this could be a small program setting an output.
Isn't that exactly an example of why we need such a flag?
We could maybe consider using enum for "modes"
Which modes are you referring to?
0eec7a8
to
4dccf48
Compare
std::shared_ptr<RobotModeData> robot_mode_data = consumer_->getRobotModeData(); | ||
if (robot_mode_data == nullptr) | ||
{ | ||
return false; |
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.
I kind of more expecting an exception to be thrown here!
… been received, yet
Add functionalities to stop the running program and to unlock a protective stop through the primary client.