Skip to content

Commit

Permalink
chore(robot-server): Adapt to new overlap specs
Browse files Browse the repository at this point in the history
This is the OT-2 calibration stack. This is probably not the right way
to do it, but we're never going to have multiple versions of the tip
overlap dict for the OT-2.
  • Loading branch information
sfoster1 committed Jun 3, 2024
1 parent df12f28 commit 63603aa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -851,8 +851,8 @@ def _get_tip_length(self) -> float:
self.active_tiprack._core.get_definition(),
).tipLength
except cal_types.TipLengthCalNotFound:
tip_overlap = self.hw_pipette.tip_overlap.get(
self.active_tiprack.uri, self.hw_pipette.tip_overlap["default"]
tip_overlap = self.hw_pipette.tip_overlap["v0"].get(
self.active_tiprack.uri, self.hw_pipette.tip_overlap["v0"]["default"]
)
tip_length = self.active_tiprack.tip_length
return tip_length - tip_overlap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def _get_tip_length(self) -> float:
self._tip_rack._core.get_definition(),
).tipLength
except cal_types.TipLengthCalNotFound:
tip_overlap = self._hw_pipette.tip_overlap.get(self._tip_rack.uri, 0)
tip_overlap = self._hw_pipette.tip_overlap["v0"].get(self._tip_rack.uri, 0)
tip_length = self._tip_rack.tip_length
return tip_length - tip_overlap

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def _get_stored_pipette_offset_cal(
def _get_tip_length(self) -> float:
stored_tip_length_cal = self._get_stored_tip_length_cal()
if stored_tip_length_cal is None or self._should_perform_tip_length:
tip_overlap = self._hw_pipette.tip_overlap.get(self._tip_rack.uri, 0)
tip_overlap = self._hw_pipette.tip_overlap["v0"].get(self._tip_rack.uri, 0)
tip_length = self._tip_rack.tip_length
return tip_length - tip_overlap
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async def save_offset(self):
def _get_default_tip_length(self) -> float:
tiprack: labware.Labware = self._deck[TIP_RACK_SLOT] # type: ignore
full_length = tiprack.tip_length
overlap_dict: Dict[str, float] = self._hw_pipette.tip_overlap
overlap_dict: Dict[str, float] = self._hw_pipette.tip_overlap["v0"]
overlap = overlap_dict.get(tiprack.uri, 0)
return full_length - overlap

Expand Down

0 comments on commit 63603aa

Please sign in to comment.