diff --git a/master/globals.h b/master/globals.h index 09287783..250a9f38 100644 --- a/master/globals.h +++ b/master/globals.h @@ -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 diff --git a/master/module.c b/master/module.c index 9f115684..7083cb0c 100644 --- a/master/module.c +++ b/master/module.c @@ -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;