Skip to content

Commit

Permalink
adding the missing breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
padhupradheep committed Sep 20, 2024
1 parent e27bf11 commit defdaa9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/RelayBoardV3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,19 +652,24 @@ bool RelayBoardV3::service_set_safety_mode(
std::shared_ptr<neo_srvs2::srv::RelayBoardSetSafetyMode::Request> req,
std::shared_ptr<neo_srvs2::srv::RelayBoardSetSafetyMode::Response> res)
{
pilot::safety_mode_e mode;
pilot::safety_mode_e mode = pilot::safety_mode_e::NONE;

switch(req->set_safety_mode.mode) {
case neo_msgs2::msg::SafetyMode::SM_NONE:
mode = pilot::safety_mode_e::NONE;
break;
case neo_msgs2::msg::SafetyMode::SM_APPROACHING:
mode = pilot::safety_mode_e::APPROACHING;
break;
case neo_msgs2::msg::SafetyMode::SM_DEPARTING:
mode = pilot::safety_mode_e::DEPARTING;
break;
case neo_msgs2::msg::SafetyMode::SM_WORKING:
mode = pilot::safety_mode_e::WORKING;
break;
case neo_msgs2::msg::SafetyMode::SM_HANDLING:
mode = pilot::safety_mode_e::HANDLING;
break;
}

try{
Expand Down

0 comments on commit defdaa9

Please sign in to comment.