Skip to content

Commit

Permalink
FilterWheel: remove deprecated position setting.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
carandraug committed Jan 6, 2023
1 parent 953d977 commit d5e6c39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 3 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
10 changes: 0 additions & 10 deletions microscope/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d5e6c39

Please sign in to comment.