fix/enums_status_with_list #65

Merged
appel_c merged 2 commits from fix/enums_status_with_list into main 2025-09-18 07:19:43 +02:00
2 changed files with 16 additions and 14 deletions

View File

@@ -105,7 +105,7 @@ class IonizationChamber0(PSIDeviceBase):
super().__init__(name=name, prefix=prefix, scan_info=scan_info, **kwargs)
@typechecked
def set_gain(self, gain: Literal["1e6", "1e7", "5e7", "1e8", "1e9"] | AmplifierGain) -> None:
def set_gain(self, gain: Literal["1e6", "1e7", "5e7", "1e8", "1e9"]) -> None:
"""Configure the gain setting of the specified channel
Args:
@@ -131,10 +131,7 @@ class IonizationChamber0(PSIDeviceBase):
self.amp.cGain_ENUM.put(AmplifierGain.G1E9)
def set_filter(
self,
value: (
Literal["1us", "3us", "10us", "30us", "100us", "300us", "1ms", "3ms"] | AmplifierFilter
),
self, value: Literal["1us", "3us", "10us", "30us", "100us", "300us", "1ms", "3ms"]
) -> None:
"""Configure the filter setting of the specified channel

View File

@@ -65,15 +65,20 @@ class AndStatusWithList(DeviceStatus):
return False
# TODO Check if this actually works....
def set_exception(self, exc):
super().set_exception(exc)
# Propagate the exception to all sub-statuses that are not done yet.
with self._lock:
for st in self.all_statuses:
with st._lock:
if not st.done:
st.set_exception(exc)
# # TODO Check if this actually works....
# def set_exception(self, exc):
# # Propagate the exception to all sub-statuses that are not done yet.
#
# with self._lock:
# if self._externally_initiated_completion:
# return
# if self.done: # Return if status is already done.. It must be resolved already
# return
# super().set_exception(exc)
# for st in self.all_statuses:
# with st._lock:
# if not st.done:
# st.set_exception(exc)
def _run_callbacks(self):
"""