Changed output of ec_state_string() for error flag to "+ ERROR".
authorFlorian Pose <fp@igh-essen.com>
Fri, 27 Oct 2006 10:41:02 +0000
changeset 453 2ecaa53c6291
parent 452 d8ae13a5a910
child 454 25cc4a3b9e0a
Changed output of ec_state_string() for error flag to "+ ERROR".
master/globals.h
master/module.c
--- a/master/globals.h	Fri Oct 27 09:57:30 2006 +0000
+++ b/master/globals.h	Fri Oct 27 10:41:02 2006 +0000
@@ -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
--- a/master/module.c	Fri Oct 27 09:57:30 2006 +0000
+++ b/master/module.c	Fri Oct 27 10:41:02 2006 +0000
@@ -265,8 +265,8 @@
         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;