Closedown

This commit is contained in:
gac-x04sa
2019-08-22 10:45:11 +02:00
parent 020fb9530a
commit 7b4cc97cbb
2 changed files with 14 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
run("diffutils")
clear_interlocks()
#alpha, delta, gamma, omegaV
setup_diff(fourcv, energy, ("mu", "delta", "gam", "eta"), simultaneous_move=True)

View File

@@ -11,18 +11,20 @@ import json
# Interlocks
###################################################################################################
class InterlockFourcv (Interlock):
def __init__(self):
Interlock.__init__(self, (fourcv, alpha, delta, gamma, omegaV))
def check(self, (p, a, d, g, o)):
if fourcv.isStartingSimultaneousMove():
a, d, g, o = p
if a>g:
return False
return True
#interlock1 = InterlockFourcv()
INTERLOCKS = []
def clear_interlocks():
for interlock in INTERLOCKS:
try:
interlock.close()
except:
pass
INTERLOCKS = []
def add_interlock(interlock):
INTERLOCKS.append(interlock)
###################################################################################################
# Hardware