Skip to content

Commit

Permalink
fixed small issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mzhouURI committed May 17, 2024
1 parent 18e58ed commit 749cb05
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/mvp_control/dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace ctrl {

static constexpr const char * SERVICE_CONTROL_ENABLE = "controller/enable";
static constexpr const char * SERVICE_CONTROL_DISABLE = "controller/disable";
static constexpr const char * SERVICE_GET_CONTROLLER_STATE = "controller/state";
static constexpr const char * SERVICE_GET_CONTROLLER_STATE = "controller/get_state";
static constexpr const char * SERVICE_GET_CONTROL_MODES = "controller/get_modes";
static constexpr const char * SERVICE_SET_CONTROL_POINT = "controller/set_point";
static constexpr const char * SERVICE_GET_ACTIVE_MODE = "controller/active_mode";
Expand Down
11 changes: 8 additions & 3 deletions src/mvp_control/mvp_control_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1191,9 +1191,14 @@ bool MvpControlROS::f_cb_srv_disable(


bool MvpControlROS::f_cb_srv_get_controller_state(
std_srvs::Trigger::Request req, std_srvs::Trigger::Response res) {
res.success = true;
res.message = m_enabled ? "enabled" : "disabled";
std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp) {
resp.success = true;
if(m_enabled){
resp.message = "enabled";
}
else{
resp.message = "disabled";
}

return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/mvp_control/mvp_control_ros.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ namespace ctrl {
* @return false
*/
bool f_cb_srv_get_controller_state(
std_srvs::Trigger::Request req,
std_srvs::Trigger::Response resp);
std_srvs::Trigger::Request &req,
std_srvs::Trigger::Response &resp);

/**
* @brief Get active control mode
Expand Down

0 comments on commit 749cb05

Please sign in to comment.