src/states.c
changeset 444 9a7f7bc82257
parent 439 95052c784cb2
child 446 f138b759026f
equal deleted inserted replaced
443:994c99afb344 444:9a7f7bc82257
   254   if(offset){
   254   if(offset){
   255     /* Adjust COB-ID Client->Server (rx) only id already set to default value or id not valid (id==0xFF)*/
   255     /* Adjust COB-ID Client->Server (rx) only id already set to default value or id not valid (id==0xFF)*/
   256     if((*(UNS32*)d->objdict[offset].pSubindex[1].pObject == 0x600 + *d->bDeviceNodeId)||(*d->bDeviceNodeId==0xFF)){
   256     if((*(UNS32*)d->objdict[offset].pSubindex[1].pObject == 0x600 + *d->bDeviceNodeId)||(*d->bDeviceNodeId==0xFF)){
   257       /* cob_id_client = 0x600 + nodeId; */
   257       /* cob_id_client = 0x600 + nodeId; */
   258       UNS32 tmp = 0x600 + nodeId;
   258       UNS32 tmp = 0x600 + nodeId;
   259       *(UNS32*)d->objdict[offset].pSubindex[1].pObject = tmp;
   259       *(UNS32*)d->objdict[offset].pSubindex[1].pObject = UNS32_LE(tmp);
   260     }
   260     }
   261     /* Adjust COB-ID Server -> Client (tx) only id already set to default value or id not valid (id==0xFF)*/
   261     /* Adjust COB-ID Server -> Client (tx) only id already set to default value or id not valid (id==0xFF)*/
   262     if((*(UNS32*)d->objdict[offset].pSubindex[2].pObject == 0x580 + *d->bDeviceNodeId)||(*d->bDeviceNodeId==0xFF)){
   262     if((*(UNS32*)d->objdict[offset].pSubindex[2].pObject == 0x580 + *d->bDeviceNodeId)||(*d->bDeviceNodeId==0xFF)){
   263       /* cob_id_server = 0x580 + nodeId; */
   263       /* cob_id_server = 0x580 + nodeId; */
   264         UNS32 tmp = 0x580 + nodeId;
   264         UNS32 tmp = 0x580 + nodeId;
   265       *(UNS32*)d->objdict[offset].pSubindex[2].pObject = tmp;
   265       *(UNS32*)d->objdict[offset].pSubindex[2].pObject = UNS32_LE(tmp);
   266     }
   266     }
   267   }
   267   }
   268 
   268 
   269   /* 
   269   /* 
   270    	Initialize the server(s) SDO parameters
   270    	Initialize the server(s) SDO parameters