canfestival/config_utils.py
changeset 1742 92932cd370a4
parent 1741 dd94b9a68c61
child 1743 c3c3d1318130
equal deleted inserted replaced
1741:dd94b9a68c61 1742:92932cd370a4
   132     @param transmittype : PDO transmit type
   132     @param transmittype : PDO transmit type
   133     @param pdomapping: list of PDO mappings
   133     @param pdomapping: list of PDO mappings
   134     @return: a tuple of value and number of parameters to add to DCF
   134     @return: a tuple of value and number of parameters to add to DCF
   135     """
   135     """
   136 
   136 
   137     dcfdata=[]
   137     dcfdata = []
   138     # Create entry for RPDO or TPDO parameters and Disable PDO
   138     # Create entry for RPDO or TPDO parameters and Disable PDO
   139     #           ---- INDEX -----   --- SUBINDEX ----   ----- SIZE ------   ------ DATA ------
   139     #           ---- INDEX -----   --- SUBINDEX ----   ----- SIZE ------   ------ DATA ------
   140     dcfdata += [LE_to_BE(idx, 2) + LE_to_BE(0x01, 1) + LE_to_BE(0x04, 4) + LE_to_BE(0x80000000 + cobid, 4)]
   140     dcfdata += [LE_to_BE(idx, 2) + LE_to_BE(0x01, 1) + LE_to_BE(0x04, 4) + LE_to_BE(0x80000000 + cobid, 4)]
   141     # Set Transmit type
   141     # Set Transmit type
   142     dcfdata += [LE_to_BE(idx, 2) + LE_to_BE(0x02, 1) + LE_to_BE(0x01, 4) + LE_to_BE(transmittype, 1)]
   142     dcfdata += [LE_to_BE(idx, 2) + LE_to_BE(0x02, 1) + LE_to_BE(0x01, 4) + LE_to_BE(transmittype, 1)]