diff --git a/python/lvmecp/dome.py b/python/lvmecp/dome.py index 3880b90..40d418b 100644 --- a/python/lvmecp/dome.py +++ b/python/lvmecp/dome.py @@ -145,12 +145,11 @@ async def close(self, force: bool = False): async def stop(self): """Stops the dome.""" - drive_enabled = await self.plc.modbus["drive_enabled"].get() status = await self.update() - if status is None or self.flag is None: raise RuntimeError("Failed retrieving dome status.") + drive_enabled = bool(status & self.flag.DRIVE_ENABLED) if not drive_enabled: return