Closedown
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
|
||||
|
||||
class InterlockMotors (Interlock):
|
||||
def __init__(self):
|
||||
Interlock.__init__(self, (delta, eta, chi, phi))
|
||||
Interlock.__init__(self, (mu, delta, gamma, eta))
|
||||
|
||||
def check(self, (d,e,c, p)):
|
||||
if e>=d:
|
||||
def check(self, (m, d, g, e)):
|
||||
if e>d:
|
||||
return False
|
||||
return True
|
||||
|
||||
@@ -14,11 +14,33 @@ class InterlockFourcv (Interlock):
|
||||
Interlock.__init__(self, (fourcv,))
|
||||
|
||||
def check(self, (p,)):
|
||||
d,e,c, p = p
|
||||
if e>=d:
|
||||
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)):
|
||||
|
||||
mg, dg, gg, eg = p
|
||||
mv = mm, md, mg, me = m!=mg, d!=dg, g!=gg, e!=eg
|
||||
nm = mv.count(True)
|
||||
simult = nm > 1
|
||||
if simult:
|
||||
m, d, g, e = p
|
||||
|
||||
print m, d, g, e
|
||||
if d>m:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
interlock1 = InterlockMotors()
|
||||
|
||||
|
||||
#interlock1.close()
|
||||
interlock2.close()
|
||||
#interlock1 = InterlockMotors()
|
||||
interlock2 = InterlockFourcv()
|
||||
Reference in New Issue
Block a user