# HG changeset patch # User luis # Date 1191313931 -7200 # Node ID dba062c5c3c183469f9ebc35658d4ad0d77878a6 # Parent 639e5ec5a12006e124a5a393f6860a73e836822f Checking if TPDO was valid was wrong (pdo.c) There were some declarations after statements in pdo.c that caused some compilers to complaint diff -r 639e5ec5a120 -r dba062c5c3c1 src/pdo.c --- a/src/pdo.c Mon Oct 01 17:17:35 2007 +0200 +++ b/src/pdo.c Tue Oct 02 10:32:11 2007 +0200 @@ -460,7 +460,7 @@ case state3: if (/*d->objdict[offsetObjdict].bSubCount < 5 || not necessary with objdictedit (always 5)*/ /* check if TPDO is not valid */ - *(UNS32*)d->objdict[offsetObjdict].pSubindex[0].pObject & 0x8000) { + *(UNS32*)d->objdict[offsetObjdict].pSubindex[1].pObject & 0x80000000) { MSG_WAR(0x3960, "Not a valid PDO ", 0x1800 + pdoNum); /*Go next TPDO*/ status = state11; @@ -525,10 +525,14 @@ /* No changes -> go to next pdo*/ status = state11; }else{ + + UNS16 EventTimerDuration; + UNS16 InhibitTimerDuration; + MSG_WAR(0x306A, "Changes TPDO number : ", pdoNum); /* Changes detected -> transmit message */ - UNS16 EventTimerDuration = *(UNS16*)d->objdict[offsetObjdict].pSubindex[5].pObject; - UNS16 InhibitTimerDuration = *(UNS16*)d->objdict[offsetObjdict].pSubindex[3].pObject; + EventTimerDuration = *(UNS16*)d->objdict[offsetObjdict].pSubindex[5].pObject; + InhibitTimerDuration = *(UNS16*)d->objdict[offsetObjdict].pSubindex[3].pObject; status = state5;