]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
Solved a mistake with parentheses in last change
authorluis <luis>
Mon, 4 Feb 2008 11:06:20 +0000 (11:06 +0000)
committerluis <luis>
Mon, 4 Feb 2008 11:06:20 +0000 (11:06 +0000)
src/pdo.c

index b8de28d33d7f4289210dbcb6abaddb469824f05d..9ceea3184b5ceffefffe89faabd797f8942417f4 100644 (file)
--- a/src/pdo.c
+++ b/src/pdo.c
@@ -68,7 +68,7 @@ UNS8 buildPDO(CO_Data* d, UNS8 numPdo, Message *pdo)
                /* pointer fo the var which holds the mapping parameter of an mapping entry  */
                UNS32* pMappingParameter = (UNS32*) TPDO_map->pSubindex[prp_j + 1].pObject;
                UNS16 index = (UNS16)((*pMappingParameter) >> 16);
-               UNS8 Size = (UNS8)(*pMappingParameter) & (UNS32)0x000000FF); /* Size in bits */
+               UNS8 Size = (UNS8)(*pMappingParameter & (UNS32)0x000000FF); /* Size in bits */
                
                /* get variable only if Size != 0 and Size is lower than remaining bits in the PDO */
                if(Size && ((offset + Size) <= 64)) {
@@ -229,7 +229,7 @@ UNS8 proceedPDO(CO_Data* d, Message *m)
                /* and the lower 8 bits contains the size of the mapped
                  variable. */
 
-               Size = (UNS8)(*pMappingParameter) & (UNS32)0x000000FF);
+               Size = (UNS8)(*pMappingParameter & (UNS32)0x000000FF);
                                        
                                        /* set variable only if Size != 0 and Size is lower than remaining bits in the PDO */
                if(Size && ((offset + Size) <= (m->len << 3))) {