graphics/FBD_Objects.py
changeset 1605 0b6b60241230
parent 1571 486f94a8032c
child 1730 64d8f52bc8c8
equal deleted inserted replaced
1604:7f98c091be56 1605:0b6b60241230
   900         if self.Type == CONNECTOR:
   900         if self.Type == CONNECTOR:
   901             connectors["inputs"].append(self.Connector)
   901             connectors["inputs"].append(self.Connector)
   902         else:
   902         else:
   903             connectors["outputs"].append(self.Connector)
   903             connectors["outputs"].append(self.Connector)
   904         return connectors
   904         return connectors
   905     
   905 
       
   906     def SpreadCurrent(self):
       
   907         if self.Type == CONNECTOR:
       
   908             continuations = self.Parent.GetContinuationByName(self.Name)
       
   909             if continuations is not None:
       
   910                 value = self.Connector.ReceivingCurrent()
       
   911                 for cont in continuations:
       
   912                     cont.Connector.SpreadCurrent(value)
       
   913 
   906     # Changes the variable type
   914     # Changes the variable type
   907     def SetType(self, type):
   915     def SetType(self, type):
   908         if type != self.Type:
   916         if type != self.Type:
   909             self.Type = type
   917             self.Type = type
   910             self.Clean()
   918             self.Clean()