diff --git a/src/openflexure_microscope_server/things/stage/__init__.py b/src/openflexure_microscope_server/things/stage/__init__.py index 3298e2ac..d0bdeab6 100644 --- a/src/openflexure_microscope_server/things/stage/__init__.py +++ b/src/openflexure_microscope_server/things/stage/__init__.py @@ -147,7 +147,7 @@ class BaseStage(lt.Thing): return self._apply_axis_direction(self._hardware_position) backlash_steps: dict[str, int] = lt.setting( - default={"x": 200, "y": 200, "z": 200}, readonly=True + default_factory=lambda: {"x": 200, "y": 200, "z": 200}, readonly=True ) """The number of steps to elimate backlash. The sign sets the direction. @@ -161,7 +161,7 @@ class BaseStage(lt.Thing): """Whether the stage is in motion.""" axis_inverted: dict[str, bool] = lt.setting( - default={"x": False, "y": False, "z": False}, readonly=True + default_factory=lambda: {"x": False, "y": False, "z": False}, readonly=True ) """Used to convert coordinates between the program frame and the hardware frame.""" diff --git a/src/openflexure_microscope_server/things/stage/dummy.py b/src/openflexure_microscope_server/things/stage/dummy.py index 4948d266..c1b0e5c5 100644 --- a/src/openflexure_microscope_server/things/stage/dummy.py +++ b/src/openflexure_microscope_server/things/stage/dummy.py @@ -77,7 +77,7 @@ class DummyStage(BaseStage): self._move_thread.join() axis_inverted: dict[str, bool] = lt.setting( - default={"x": True, "y": False, "z": False}, readonly=True + default_factory=lambda: {"x": True, "y": False, "z": False}, readonly=True ) """Used to convert coordinates between the program frame and the hardware frame.""" diff --git a/src/openflexure_microscope_server/things/stage/sangaboard.py b/src/openflexure_microscope_server/things/stage/sangaboard.py index a6c99eb9..b8ad994c 100644 --- a/src/openflexure_microscope_server/things/stage/sangaboard.py +++ b/src/openflexure_microscope_server/things/stage/sangaboard.py @@ -76,7 +76,7 @@ class SangaboardThing(BaseStage): self._sangaboard.close() axis_inverted: dict[str, bool] = lt.setting( - default={"x": True, "y": False, "z": True}, readonly=True + default_factory=lambda: {"x": True, "y": False, "z": True}, readonly=True ) """Used to convert coordinates between the program frame and the hardware frame."""