Skip to content
Snippets Groups Projects
Commit 7d4b3ddd authored by kpetersn's avatar kpetersn
Browse files

Lengthened the resyncAfterConnect delay and prevented a resync after connect...

Lengthened the resyncAfterConnect delay and prevented a resync after connect from happening at startup.  Added stuff to abort on disconnect, but the functional part of it is commented out.

git-svn-id: https://subversion.xray.aps.anl.gov/kmp/transform/trunk@212 f095f811-4e88-6c84-d33e-e382bdb4531c
parent 25a79a2e
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ class transform:
self.syncSoftTargetFlag = False
self.reinitFlag = False
self.softMotorInitiatedMove = False
self.abortFlag = False
### PVs to set
......@@ -134,6 +135,8 @@ class transform:
else:
print "\t", self.reinitFlag, kw
# Abort instead of reconnecting for now
#!self.abortFlag = True
### Functions that actually do stuff (and reset callback flags)
......@@ -234,8 +237,8 @@ class transform:
self.stopMotorsFlag = False
def resyncAfterReconnect(self):
#!print "resyncing motors"
sleep(0.1)
print "resyncing motors"
sleep(0.5)
self.updateReadbacks()
self.reinitFlag = False
......@@ -260,13 +263,20 @@ class transform:
### The main loop (essentially a state program)
def main(self):
#!print "ENTERING MAIN LOOP"
# Reset reinitFlag so initial connect doens't cause reinit to happen
self.reinitFlag = False
while True:
# Idle loop
epics.poll(evt=1.e-5, iot=0.1)
if self.abortFlag == True:
break
# The order of these if statements is important. The ones that appear first take precendence.
if self.reinitFlag == True:
#!print "idle: resyncing after reconnect"
#!print " self.reinitFlag = ", self.reinitFlag
self.resyncAfterReconnect()
if self.stopMotorsFlag == True:
#!print "idle: stop motors"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment