made CHIC (theoretically) scanable, i.e., set_target_value returns a Task
This commit is contained in:
@ -65,7 +65,7 @@ class Undulators(Adjustable):
|
||||
tasks.append(t)
|
||||
wait_for_all(tasks)
|
||||
print("Warning: CHIC adjustment is still commented!")
|
||||
# self.chic.set_target_value(value) #TODO: test whether an additional sleep is needed
|
||||
# self.chic.set_target_value(value).wait() #TODO: test whether an additional sleep is needed
|
||||
|
||||
return self._as_task(change, hold=hold)
|
||||
|
||||
@ -161,10 +161,17 @@ class CHIC(PVAdjustable):
|
||||
self.pvs.start = PV("SATUN-CHIC:APPLY-DELAY-OFFSET-PHASE")
|
||||
self.units = units
|
||||
|
||||
def set_target_value(self, value):
|
||||
|
||||
def set_target_value(self, value, hold=False):
|
||||
value /= 1000
|
||||
super().set_target_value(value)
|
||||
self.pv_start.put(1)
|
||||
|
||||
def change():
|
||||
super().set_target_value(value).wait()
|
||||
self.pvs.start.put(1, wait=True)
|
||||
#TODO: test whether an additional sleep is needed
|
||||
|
||||
return self._as_task(change, hold=hold)
|
||||
|
||||
|
||||
def get_current_value(self):
|
||||
return super().get_current_value() * 1000
|
||||
|
Reference in New Issue
Block a user