From 2a90bd26daf5f748a4ee2f0f185853fd69f971d2 Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Fri, 27 Oct 2006 10:41:02 +0000 Subject: [PATCH] Changed output of ec_state_string() for error flag to "+ ERROR". --- master/globals.h | 2 +- master/module.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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;