Skip to content

Commit

Permalink
Merge pull request 4am-robotics#286 from ipa-mdl/bms-recover
Browse files Browse the repository at this point in the history
BMS: restart CAN interface on failure
  • Loading branch information
Florian Weisshardt authored Aug 4, 2016
2 parents c457586 + d78f2fb commit b3ec335
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cob_bms_driver/src/cob_bms_driver_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ void CobBmsDriverNode::diagnosticsTimerCallback(const ros::TimerEvent& event)
{
//update diagnostics
updater_.update();
if(!socketcan_interface_.getState().isReady()){
ROS_ERROR("Restarting BMS socketcan");
socketcan_interface_.shutdown();
socketcan_interface_.recover();
}
}

int main(int argc, char **argv)
Expand Down

0 comments on commit b3ec335

Please sign in to comment.