From d5e6c39dc9f2da2eaca9e5923d6b837e6e58332a Mon Sep 17 00:00:00 2001 From: David Miguel Susano Pinto Date: Fri, 6 Jan 2023 03:54:32 +0000 Subject: [PATCH] FilterWheel: remove deprecated position setting. Getting and setting a filterwheel from the device settings has been deprecated for a while and the related get/set methods have been around since forever. Cockpit now also uses the getter and setter methods which was the only reason this was not removed before. This commit removes the position setting. --- NEWS.rst | 3 +++ microscope/abc.py | 10 ---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index 4c38c3db..bcb0c4d0 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -23,6 +23,9 @@ Version 0.7.0 (upcoming) removed from the base class and is now only kept by cameras that actually make use of it, namely, ``PVCamera`` and ``AndorAtmcd``. + * All filterwheels had a ``"position"`` setting which was redundant + with the related get/set methods. The setting was been removed. + * New devices supported: * Hamamatsu cameras (:class:`microscope.cameras.hamamatsu.HamamatsuCamera`) diff --git a/microscope/abc.py b/microscope/abc.py index e1bd48e8..615212e6 100644 --- a/microscope/abc.py +++ b/microscope/abc.py @@ -1265,16 +1265,6 @@ def __init__(self, positions: int, **kwargs) -> None: "positions must be a positive number (was %d)" % positions ) self._positions = positions - # The position as an integer. - # Deprecated: clients should call get_position and set_position; - # still exposed as a setting until cockpit uses set_position. - self.add_setting( - "position", - "int", - self.get_position, - self.set_position, - lambda: (0, self.get_num_positions()), - ) @property def n_positions(self) -> int: