Skip to content

Commit

Permalink
Make ERROR slave count exceeded unique
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Karlsson committed May 24, 2019
1 parent 7b1ea32 commit 9c921d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion soem/ethercatconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ int ecx_detect_slaves(ecx_contextt *context)
{
EC_PRINT("Error: too many slaves on network: num_slaves=%d, EC_MAXSLAVE=%d\n",
wkc, EC_MAXSLAVE);
return -2;
return EC_SLAVECOUNTEXCEEDED;
}
}
return wkc;
Expand Down
10 changes: 6 additions & 4 deletions soem/ethercattype.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ extern "C"
# define EC_LITTLE_ENDIAN
#endif

/** return value general error */
#define EC_ERROR -3
/** return value no frame returned */
#define EC_NOFRAME -1
#define EC_NOFRAME -1
/** return value unknown frame received */
#define EC_OTHERFRAME -2
#define EC_OTHERFRAME -2
/** return value general error */
#define EC_ERROR -3
/** return value too many slaves */
#define EC_SLAVECOUNTEXCEEDED -4
/** maximum EtherCAT frame length in bytes */
#define EC_MAXECATFRAME 1518
/** maximum EtherCAT LRW frame length in bytes */
Expand Down

0 comments on commit 9c921d8

Please sign in to comment.