Skip to content

Commit

Permalink
reset head
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Sep 26, 2024
1 parent 1dd1a20 commit 3e09c0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
3 changes: 0 additions & 3 deletions api/src/opentrons/protocol_engine/state/pipettes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
CurrentPipetteLocation,
TipGeometry,
)
from ..commands.configuring_common import (
PipetteNozzleLayoutResultMixin,
)
from ..actions import (
Action,
SetPipetteMovementSpeedAction,
Expand Down
18 changes: 8 additions & 10 deletions api/src/opentrons/protocol_engine/state/tips.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
DropTipInPlaceResult,
unsafe,
)
from ..commands.configuring_common import (
PipetteConfigUpdateResultMixin,
PipetteNozzleLayoutResultMixin,
)
from . import update_types

from ..error_recovery_policy import ErrorRecoveryType

from opentrons.hardware_control.nozzle_manager import NozzleMap
Expand Down Expand Up @@ -69,17 +67,17 @@ def __init__(self) -> None:
def handle_action(self, action: Action) -> None:
"""Modify state in reaction to an action."""
if isinstance(action, SucceedCommandAction):
if isinstance(action.private_result, PipetteConfigUpdateResultMixin):
pipette_id = action.private_result.pipette_id
config = action.private_result.config
if action.state_update.pipette_config != update_types.NO_CHANGE:
pipette_id = action.state_update.pipette_config.pipette_id
config = action.state_update.pipette_config.config
self._state.channels_by_pipette_id[pipette_id] = config.channels
self._state.active_channels_by_pipette_id[pipette_id] = config.channels
self._state.nozzle_map_by_pipette_id[pipette_id] = config.nozzle_map
self._handle_succeeded_command(action.command)

if isinstance(action.private_result, PipetteNozzleLayoutResultMixin):
pipette_id = action.private_result.pipette_id
nozzle_map = action.private_result.nozzle_map
if action.state_update.pipette_nozzle_map != update_types.NO_CHANGE:
pipette_id = action.state_update.pipette_nozzle_map.pipette_id
nozzle_map = action.state_update.pipette_nozzle_map.nozzle_map
if nozzle_map:
self._state.active_channels_by_pipette_id[
pipette_id
Expand Down

0 comments on commit 3e09c0a

Please sign in to comment.