# HG changeset patch # User skratochwil # Date 1308575034 -7200 # Node ID cff8e50333e85eb05db6d707c83cb0474f917d2d # Parent 1041153c5fd2039e1795d686d1139ca5a92cae4f Fixed incorrect struct access in sendPDO() and inserted a missing variable in sendOnePDOEvent(). These errors occured at compile-time when configuring the project with './configure --debug=PDO' or './configure --debug=WAR'. diff -r 1041153c5fd2 -r cff8e50333e8 src/pdo.c --- a/src/pdo.c Wed Apr 13 16:29:59 2011 +0200 +++ b/src/pdo.c Mon Jun 20 15:03:54 2011 +0200 @@ -487,8 +487,8 @@ { /*store_as_last_message */ d->PDO_status[pdoNum].last_message = *pdo; - MSG_WAR (0x396D, "sendPDO cobId :", UNS16_LE(pdo.cob_id)); - MSG_WAR (0x396E, " Nb octets : ", pdo.len); + MSG_WAR (0x396D, "sendPDO cobId :", UNS16_LE(pdo->cob_id)); + MSG_WAR (0x396E, " Nb octets : ", pdo->len); canSend (d->canHandle, pdo); } @@ -512,6 +512,7 @@ UNS8 sendOnePDOevent (CO_Data * d, UNS8 pdoNum) { + UNS8 *pTransmissionType; UNS16 offsetObjdict; Message pdo; if (!d->CurrentCommunicationState.csPDO || @@ -521,6 +522,8 @@ } offsetObjdict = (UNS16) (d->firstIndex->PDO_TRS + pdoNum); + pTransmissionType = (UNS8 *) d->objdict[offsetObjdict].pSubindex[2].pObject; + MSG_WAR (0x3968, " PDO is on EVENT. Trans type : ", *pTransmissionType);