ips_mercury: add NOT_FOUND action
This commit is contained in:
@ -28,9 +28,9 @@ from frappy_psi.magfield import Magfield, SimpleMagfield, Status
|
|||||||
from frappy_psi.mercury import MercuryChannel, off_on, Mapped
|
from frappy_psi.mercury import MercuryChannel, off_on, Mapped
|
||||||
from frappy.states import Retry
|
from frappy.states import Retry
|
||||||
|
|
||||||
Action = Enum(hold=0, run_to_set=1, run_to_zero=2, clamped=3)
|
Action = Enum(hold=0, run_to_set=1, run_to_zero=2, clamped=3, not_found=4)
|
||||||
hold_rtoz_rtos_clmp = Mapped(HOLD=Action.hold, RTOS=Action.run_to_set,
|
hold_rtoz_rtos_clmp = Mapped(HOLD=Action.hold, RTOS=Action.run_to_set,
|
||||||
RTOZ=Action.run_to_zero, CLMP=Action.clamped)
|
RTOZ=Action.run_to_zero, CLMP=Action.clamped, NOT_FOUND=Action.not_found)
|
||||||
CURRENT_CHECK_SIZE = 2
|
CURRENT_CHECK_SIZE = 2
|
||||||
|
|
||||||
|
|
||||||
@ -161,6 +161,7 @@ class Field(SimpleField, Magfield):
|
|||||||
if self.switch_heater == self.switch_heater.on:
|
if self.switch_heater == self.switch_heater.on:
|
||||||
self.__persistent_field = current
|
self.__persistent_field = current
|
||||||
self.forced_persistent_field = False
|
self.forced_persistent_field = False
|
||||||
|
self._field_mismatch = False
|
||||||
return current
|
return current
|
||||||
pf = self.query('DEV::PSU:SIG:PFLD')
|
pf = self.query('DEV::PSU:SIG:PFLD')
|
||||||
if self.__persistent_field is None:
|
if self.__persistent_field is None:
|
||||||
|
Reference in New Issue
Block a user