Skip to content

Commit d5e6c39

Browse files
committed
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.
1 parent 953d977 commit d5e6c39

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

NEWS.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Version 0.7.0 (upcoming)
2323
removed from the base class and is now only kept by cameras that
2424
actually make use of it, namely, ``PVCamera`` and ``AndorAtmcd``.
2525

26+
* All filterwheels had a ``"position"`` setting which was redundant
27+
with the related get/set methods. The setting was been removed.
28+
2629
* New devices supported:
2730

2831
* Hamamatsu cameras (:class:`microscope.cameras.hamamatsu.HamamatsuCamera`)

microscope/abc.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,16 +1265,6 @@ def __init__(self, positions: int, **kwargs) -> None:
12651265
"positions must be a positive number (was %d)" % positions
12661266
)
12671267
self._positions = positions
1268-
# The position as an integer.
1269-
# Deprecated: clients should call get_position and set_position;
1270-
# still exposed as a setting until cockpit uses set_position.
1271-
self.add_setting(
1272-
"position",
1273-
"int",
1274-
self.get_position,
1275-
self.set_position,
1276-
lambda: (0, self.get_num_positions()),
1277-
)
12781268

12791269
@property
12801270
def n_positions(self) -> int:

0 commit comments

Comments
 (0)