Skip to content

Commit 3669c0b

Browse files
committed
rev shaker
1 parent 9598c07 commit 3669c0b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pylabrobot/shaking/shaker.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import asyncio
22
from typing import Optional
33

4-
from pylabrobot.heating_shaking.backend import HeaterShakerBackend
5-
from pylabrobot.heating_shaking.chatterbox import HeaterShakerChatterboxBackend
64
from pylabrobot.machines.machine import Machine
75
from pylabrobot.resources.resource_holder import ResourceHolder
6+
from pylabrobot.shaking.chatterbox import ShakerChatterboxBackend
7+
8+
from .backend import ShakerBackend
89

910

1011
class Shaker(ResourceHolder, Machine):
@@ -16,8 +17,8 @@ def __init__(
1617
size_x: float,
1718
size_y: float,
1819
size_z: float,
19-
backend: HeaterShakerBackend,
20-
category: str = "heatershaker",
20+
backend: ShakerBackend,
21+
category: str = "shaker",
2122
model: Optional[str] = None,
2223
):
2324
ResourceHolder.__init__(
@@ -30,7 +31,7 @@ def __init__(
3031
model=model,
3132
)
3233
Machine.__init__(self, backend=backend)
33-
self.backend: HeaterShakerBackend = backend # fix type
34+
self.backend: ShakerBackend = backend # fix type
3435

3536
async def shake(self, speed: float, duration: Optional[float] = None):
3637
"""Shake the shaker at the given speed
@@ -42,7 +43,7 @@ async def shake(self, speed: float, duration: Optional[float] = None):
4243
await self.backend.lock_plate()
4344
await self.backend.shake(speed=speed)
4445

45-
if duration is None or isinstance(self.backend, HeaterShakerChatterboxBackend):
46+
if duration is None or isinstance(self.backend, ShakerChatterboxBackend):
4647
return
4748

4849
await asyncio.sleep(duration)

0 commit comments

Comments
 (0)