Skip to content

Commit

Permalink
Only use slewStop for kmirror devices
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Nov 28, 2024
1 parent 050d993 commit 50b7578
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/gort/devices/telescope.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class MoTanDevice(GortDevice):
#: Artificial delay introduced to prevent all motors to slew at the same time.
SLEW_DELAY: ClassVar[float | dict[str, float]] = 0

device_type: ClassVar[str]

def __init__(self, gort: Gort, name: str, actor: str):
super().__init__(gort, name, actor)

Expand Down Expand Up @@ -101,7 +103,8 @@ async def stop(self):
if await self.is_moving():
self.write_to_log("Stopping slew.")

await self.run_command("slewStop", timeout=self.timeouts["slewStop"])
if self.device_type == "kmirror":
await self.run_command("slewStop", timeout=self.timeouts["slewStop"])
await self.run_command("stop", timeout=self.timeouts["slewStop"])

if await self.is_moving():
Expand Down Expand Up @@ -134,6 +137,8 @@ class KMirror(MoTanDevice):

SLEW_DELAY = 0

device_type = "kmirror"

async def home(self):
"""Homes the k-mirror."""

Expand Down Expand Up @@ -239,6 +244,8 @@ class Focuser(MoTanDevice):

SLEW_DELAY = 0

device_type = "focuser"

async def home(self):
"""Homes the focuser.
Expand Down Expand Up @@ -293,6 +300,8 @@ class FibSel(MoTanDevice):
# Rehome after this many seconds.
HOME_AFTER: float | None = None

device_type = "fibsel"

def __init__(self, gort: Gort, name: str, actor: str):
super().__init__(gort, name, actor)

Expand Down

0 comments on commit 50b7578

Please sign in to comment.