move start_ramp_to_target to SimpleMagfiield

Change-Id: Iab3fe8738c560bf5ac2f11a4a34428a8ffd6a7c2
This commit is contained in:
zolliker 2024-12-20 15:49:33 +01:00
parent dda4afbe5b
commit 85400a2777

View File

@ -140,6 +140,15 @@ class SimpleMagfield(HasStates, Drivable):
self.setFastPoll(True, 1.0)
return self.start_ramp_to_target
@status_code(Status.RAMPING)
def start_ramp_to_target(self, sm):
"""start ramping current to target field
initiate ramp to target
the implementation should return ramp_to_target
"""
raise NotImplementedError
@status_code(BUSY, 'ramping field')
def ramp_to_target(self, sm):
if sm.init:
@ -324,15 +333,6 @@ class Magfield(SimpleMagfield):
self._last_target = sm.target
return self.start_ramp_to_target
@status_code(Status.RAMPING)
def start_ramp_to_target(self, sm):
"""start ramping current to target field
initiate ramp to target
the implementation should return ramp_to_target
"""
raise NotImplementedError
@status_code(Status.RAMPING)
def ramp_to_target(self, sm):
dif = abs(self.value - sm.target)