plugins/canfestival/config_utils.py
changeset 59 b6ff896ff58b
parent 58 c0741cc16c99
child 61 a20fb174f46e
equal deleted inserted replaced
58:c0741cc16c99 59:b6ff896ff58b
   491                 self.MasterNode.SetEntry(current_idx, 0x02, 0x01)
   491                 self.MasterNode.SetEntry(current_idx, 0x02, 0x01)
   492             else:
   492             else:
   493                 self.MasterNode.SetEntry(current_idx, 0x02, 0xFF)
   493                 self.MasterNode.SetEntry(current_idx, 0x02, 0xFF)
   494             
   494             
   495             # Add some subentries to PDO mapping if there is not enough
   495             # Add some subentries to PDO mapping if there is not enough
   496             if len(pdo_infos["mapping"]) > 2:
   496             if len(pdo_infos["mapping"]) > 1:
   497                 self.Manager.AddSubentriesToCurrent(current_idx + 0x200, len(pdo_infos["mapping"]) - 2, self.MasterNode)
   497                 self.Manager.AddSubentriesToCurrent(current_idx + 0x200, len(pdo_infos["mapping"]) - 1, self.MasterNode)
   498             
   498             
   499             # Generate MasterNode's PDO mapping
   499             # Generate MasterNode's PDO mapping
   500             for subindex, variable in enumerate(pdo_infos["mapping"]):
   500             for subindex, variable in enumerate(pdo_infos["mapping"]):
   501                 if subindex == 0:
   501                 if subindex == 0:
   502                     continue
   502                     continue