1
1
import asyncio
2
2
from typing import Optional
3
3
4
- from pylabrobot .heating_shaking .backend import HeaterShakerBackend
5
- from pylabrobot .heating_shaking .chatterbox import HeaterShakerChatterboxBackend
6
4
from pylabrobot .machines .machine import Machine
7
5
from pylabrobot .resources .resource_holder import ResourceHolder
6
+ from pylabrobot .shaking .chatterbox import ShakerChatterboxBackend
7
+
8
+ from .backend import ShakerBackend
8
9
9
10
10
11
class Shaker (ResourceHolder , Machine ):
@@ -16,8 +17,8 @@ def __init__(
16
17
size_x : float ,
17
18
size_y : float ,
18
19
size_z : float ,
19
- backend : HeaterShakerBackend ,
20
- category : str = "heatershaker " ,
20
+ backend : ShakerBackend ,
21
+ category : str = "shaker " ,
21
22
model : Optional [str ] = None ,
22
23
):
23
24
ResourceHolder .__init__ (
@@ -30,7 +31,7 @@ def __init__(
30
31
model = model ,
31
32
)
32
33
Machine .__init__ (self , backend = backend )
33
- self .backend : HeaterShakerBackend = backend # fix type
34
+ self .backend : ShakerBackend = backend # fix type
34
35
35
36
async def shake (self , speed : float , duration : Optional [float ] = None ):
36
37
"""Shake the shaker at the given speed
@@ -42,7 +43,7 @@ async def shake(self, speed: float, duration: Optional[float] = None):
42
43
await self .backend .lock_plate ()
43
44
await self .backend .shake (speed = speed )
44
45
45
- if duration is None or isinstance (self .backend , HeaterShakerChatterboxBackend ):
46
+ if duration is None or isinstance (self .backend , ShakerChatterboxBackend ):
46
47
return
47
48
48
49
await asyncio .sleep (duration )
0 commit comments