]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
Now, setNodeId does change TPDO and RPDO CobId without testing previous CobId in...
authoretisserant <etisserant>
Thu, 12 Apr 2007 14:14:07 +0000 (14:14 +0000)
committeretisserant <etisserant>
Thu, 12 Apr 2007 14:14:07 +0000 (14:14 +0000)
src/states.c

index 974214154ef17156b11f5b749d462831e604f29e..dd7bb585f9ef3dd21768e1baadad02bbb15d21c3 100644 (file)
@@ -184,7 +184,7 @@ void setNodeId(CO_Data* d, UNS8 nodeId)
     UNS16 lastIndex = d->lastIndex->PDO_RCV;
     UNS32 cobID[] = {0x200, 0x300, 0x400, 0x500};
     if( offset ) while( (offset <= lastIndex) && (i < 4)) {
-      if(*(UNS32*)d->objdict[offset].pSubindex[1].pObject == cobID[i] + *d->bDeviceNodeId)
+      //if(*(UNS32*)d->objdict[offset].pSubindex[1].pObject == cobID[i] + *d->bDeviceNodeId)
              *(UNS32*)d->objdict[offset].pSubindex[1].pObject = cobID[i] + nodeId;
       i ++;
       offset ++;
@@ -198,7 +198,7 @@ void setNodeId(CO_Data* d, UNS8 nodeId)
     UNS32 cobID[] = {0x180, 0x280, 0x380, 0x480};
     i = 0;
     if( offset ) while ((offset <= lastIndex) && (i < 4)) {
-      if(*(UNS32*)d->objdict[offset].pSubindex[1].pObject == cobID[i] + *d->bDeviceNodeId)
+      //if(*(UNS32*)d->objdict[offset].pSubindex[1].pObject == cobID[i] + *d->bDeviceNodeId)
              *(UNS32*)d->objdict[offset].pSubindex[1].pObject = cobID[i] + nodeId;
       i ++;
       offset ++;