Skip to content

Commit

Permalink
Fix consistent bridge crash
Browse files Browse the repository at this point in the history
Solution from ros-industrial#285
  • Loading branch information
juliaschatz committed Feb 21, 2020
1 parent a8012b0 commit 59da63b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions socketcan_interface/include/socketcan_interface/socketcan.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,17 @@ class SocketCANInterface : public AsioDriver<boost::asio::posix::stream_descript
input_.id = frame_.can_id & CAN_EFF_MASK;
input_.is_error = 1;

ROSCANOPEN_ERROR("socketcan_interface", "internal error: " << input_.id);
//ROSCANOPEN_ERROR("socketcan_interface", "internal error: " << input_.id);
setInternalError(input_.id);
setNotReady();
//setNotReady();
ROSCANOPEN_ERROR("error: " << input_.id);
if (frame_.can_id & CAN_ERR_LOSTARB ||
frame_.can_id & CAN_ERR_CRTL)
{
ROSCANOPEN_WARN("warn: ignoring arbitration (2) or controller (4) error");
} else {
setNotReady();
}

}else{
input_.is_extended = (frame_.can_id & CAN_EFF_FLAG) ? 1 :0;
Expand Down

0 comments on commit 59da63b

Please sign in to comment.