Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional check of fully reading (line 926) #702

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions soem/ethercatcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,11 @@ int ecx_readPDOmapCA(ecx_contextt *context, uint16 Slave, int Thread_n, uint32 *
/* read SyncManager Communication Type object count Complete Access*/
wkc = ecx_SDOread(context, Slave, ECT_SDO_SMCOMMTYPE, 0x00, TRUE, &rdl,
&(context->SMcommtype[Thread_n]), EC_TIMEOUTRXM);

/* check of fully reading */
if ((wkc > 0) && (rdl!=sizeof(ec_SMcommtypet)))
wkc = 0;

/* positive result from slave ? */
if ((wkc > 0) && (context->SMcommtype[Thread_n].n > 2))
{
Expand Down