Skip to content
Snippets Groups Projects
Commit fc2a2ce4 authored by Florian Pose's avatar Florian Pose
Browse files

Changed output of ec_state_string() for error flag to "+ ERROR".

parent 8b639ff4
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@
#define EC_WAIT_SDO_DICT 3
/** minimum size of a buffer used with ec_state_string() */
#define EC_STATE_STRING_SIZE 30
#define EC_STATE_STRING_SIZE 32
/******************************************************************************
* EtherCAT protocol
......
......@@ -265,8 +265,8 @@ size_t ec_state_string(uint8_t states, /**< slave states */
off += sprintf(buffer + off, "OP");
}
if (states & EC_SLAVE_STATE_ACK_ERR) {
if (!first) off += sprintf(buffer + off, ", ");
off += sprintf(buffer + off, "ERR");
if (!first) off += sprintf(buffer + off, " + ");
off += sprintf(buffer + off, "ERROR");
}
return off;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment