Skip to content

Commit

Permalink
Add in the error ignore routine as mentioned in ros-industrial#285
Browse files Browse the repository at this point in the history
  • Loading branch information
UTS committed Jul 18, 2019
1 parent dc6d283 commit a0473e7
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 @@ -200,9 +200,17 @@ class SocketCANInterface : public AsioDriver<boost::asio::posix::stream_descript
input_.id = frame_.can_id & CAN_EFF_MASK;
input_.is_error = 1;

LOG("error: " << input_.id);
//LOG("error: " << input_.id);
setInternalError(input_.id);
setNotReady();
//setNotReady();
LOG("error: " << input_.id);
if (frame_.can_id & CAN_ERR_LOSTARB || frame_.can_id & CAN_ERR_CRTL)
{
LOG("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 a0473e7

Please sign in to comment.