src/pdo.c
changeset 661 06494ae5b2b6
parent 660 cff8e50333e8
child 670 e37511baf56b
equal deleted inserted replaced
660:cff8e50333e8 661:06494ae5b2b6
   510 }
   510 }
   511 
   511 
   512 UNS8
   512 UNS8
   513 sendOnePDOevent (CO_Data * d, UNS8 pdoNum)
   513 sendOnePDOevent (CO_Data * d, UNS8 pdoNum)
   514 {
   514 {
   515   UNS8 *pTransmissionType;
       
   516   UNS16 offsetObjdict;
   515   UNS16 offsetObjdict;
   517   Message pdo;
   516   Message pdo;
   518   if (!d->CurrentCommunicationState.csPDO ||
   517   if (!d->CurrentCommunicationState.csPDO ||
   519       (d->PDO_status[pdoNum].transmit_type_parameter & PDO_INHIBITED))
   518       (d->PDO_status[pdoNum].transmit_type_parameter & PDO_INHIBITED))
   520     {
   519     {
   521       return 0;
   520       return 0;
   522     }
   521     }
   523 
   522 
   524   offsetObjdict = (UNS16) (d->firstIndex->PDO_TRS + pdoNum);
   523   offsetObjdict = (UNS16) (d->firstIndex->PDO_TRS + pdoNum);
   525   pTransmissionType = (UNS8 *) d->objdict[offsetObjdict].pSubindex[2].pObject;
       
   526 
   524 
   527   MSG_WAR (0x3968, "  PDO is on EVENT. Trans type : ",
   525   MSG_WAR (0x3968, "  PDO is on EVENT. Trans type : ",
   528            *pTransmissionType);
   526            *((UNS8 *) d->objdict[offsetObjdict].pSubindex[2].pObject));
   529   
   527   
   530   memset(&pdo, 0, sizeof(pdo));
   528   memset(&pdo, 0, sizeof(pdo));
   531   if (buildPDO (d, pdoNum, &pdo))
   529   if (buildPDO (d, pdoNum, &pdo))
   532     {
   530     {
   533       MSG_ERR (0x3907, " Couldn't build TPDO number : ",
   531       MSG_ERR (0x3907, " Couldn't build TPDO number : ",