39 lines
875 B
Python
39 lines
875 B
Python
|
|
class InterlockMotors (Interlock):
|
|
def __init__(self):
|
|
Interlock.__init__(self, (mu, delta, gamma, eta))
|
|
|
|
def check(self, (m, d, g, e)):
|
|
if e>d:
|
|
return False
|
|
return True
|
|
|
|
|
|
class InterlockFourcv (Interlock):
|
|
def __init__(self):
|
|
Interlock.__init__(self, (fourcv,))
|
|
|
|
def check(self, (p,)):
|
|
m, d, g, e = p
|
|
if d>m:
|
|
return False
|
|
return True
|
|
|
|
|
|
class InterlockFourcv (Interlock):
|
|
def __init__(self):
|
|
Interlock.__init__(self, (fourcv, mu, delta, gamma, eta))
|
|
|
|
def check(self, (p, m, d, g, e)):
|
|
if fourcv.isStartingSimultaneousMove():
|
|
m, d, g, e = p
|
|
if d>m:
|
|
return False
|
|
return True
|
|
|
|
|
|
|
|
#interlock1.close()
|
|
interlock2.close()
|
|
#interlock1 = InterlockMotors()
|
|
interlock2 = InterlockFourcv() |