Commit 54804a2e authored by augustin_s's avatar augustin_s 🐍
Browse files

made CHIC (theoretically) scanable, i.e., set_target_value returns a Task

parent 6f6c8ee7
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment