Skip to content

Commit

Permalink
fix(api): make hs wait until idle on deactivate shake (#11342)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanni-t authored Aug 16, 2022
1 parent aeb8c46 commit a78b6fb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions api/src/opentrons/hardware_control/modules/heater_shaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,15 @@ async def _wait_for_labware_latch(
while self.labware_latch_status != status:
await self.wait_next_poll()

async def _wait_for_shake_deactivation(self) -> None:
"""Wait until hardware reports that module has stopped shaking and has homed."""
while self.speed_status != SpeedStatus.IDLE:
await self.wait_next_poll()

async def deactivate(self) -> None:
"""Stop heating/cooling; stop shaking and home the plate"""
await self.wait_for_is_running()
await self._driver.deactivate_heater()
await self._driver.home()
await self.wait_next_poll()
await self.deactivate_heater()
await self.deactivate_shaker()

async def deactivate_heater(self) -> None:
"""Stop heating/cooling"""
Expand All @@ -428,7 +431,7 @@ async def deactivate_shaker(self) -> None:
"""Stop shaking and home the plate"""
await self.wait_for_is_running()
await self._driver.home()
await self.wait_next_poll()
await self._wait_for_shake_deactivation()

async def open_labware_latch(self) -> None:
await self.wait_for_is_running()
Expand Down

0 comments on commit a78b6fb

Please sign in to comment.