Commit 2c821d81 authored by Georgios Dagkakis's avatar Georgios Dagkakis

CoreObject.checkIfActive to consider also break

parent a2385933
...@@ -96,6 +96,7 @@ class CoreObject(ManPyObject): ...@@ -96,6 +96,7 @@ class CoreObject(ManPyObject):
self.env=G.env self.env=G.env
self.Up=True #Boolean that shows if the object is in failure ("Down") or not ("up") self.Up=True #Boolean that shows if the object is in failure ("Down") or not ("up")
self.onShift=True self.onShift=True
self.onBreak=False
self.currentEntity=None self.currentEntity=None
# ============================== total times =============================================== # ============================== total times ===============================================
self.totalOperationTime=0 #dummy variable to hold totalWorkin/SetupTime during an interruption (yield ...(self.operation('setup')) self.totalOperationTime=0 #dummy variable to hold totalWorkin/SetupTime during an interruption (yield ...(self.operation('setup'))
...@@ -839,7 +840,7 @@ class CoreObject(ManPyObject): ...@@ -839,7 +840,7 @@ class CoreObject(ManPyObject):
# checks if the object is in an active position # checks if the object is in an active position
# ======================================================================= # =======================================================================
def checkIfActive(self): def checkIfActive(self):
return self.Up and self.onShift return self.Up and self.onShift and (not self.onBreak)
#=========================================================================== #===========================================================================
# filter that returns True if the activeObject Queue is empty and # filter that returns True if the activeObject Queue is empty and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment