Skip to content

Commit

Permalink
log EMCY error resets with INFO level
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke committed Dec 18, 2020
1 parent 7bbc9d7 commit eaaf0a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion canopen_master/src/emcy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ struct EMCYmsg{

void EMCYHandler::handleEMCY(const can::Frame & msg){
EMCYmsg::Frame em(msg);
ROSCANOPEN_ERROR("canopen_master", "EMCY received: " << msg);
if (em.data.error_code == 0) {
ROSCANOPEN_INFO("canopen_master", "EMCY reset: " << msg);
} else {
ROSCANOPEN_ERROR("canopen_master", "EMCY received: " << msg);
}
has_error_ = (em.data.error_register & ~32) != 0;
}

Expand Down

0 comments on commit eaaf0a1

Please sign in to comment.