Skip to content

Commit

Permalink
fix(api): Fix issue where previous cal offsets are used when calibrat…
Browse files Browse the repository at this point in the history
…ing the instruments. (#13325)
  • Loading branch information
vegano1 authored Aug 16, 2023
1 parent bb10fcc commit a882af1
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,7 @@ def _reload_gripper(
# are similar enough that we might skip, see if the configs
# match closely enough.
# Returns a gripper object
if (
new_config == attached_instr.config
and cal_offset == attached_instr._calibration_offset
):
if new_config == attached_instr.config:
# Same config, good enough
return attached_instr, True
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,7 @@ def _reload_and_check_skip(
# match closely enough.
# Returns a pipette object and True if we may skip hw reconfig
# TODO this can potentially be removed in a follow-up refactor.
if (
new_config == attached_instr.config
and pipette_offset == attached_instr._pipette_offset
):
if new_config == attached_instr.config:
# Same config, good enough
return attached_instr, True
else:
Expand Down
2 changes: 0 additions & 2 deletions api/tests/opentrons/hardware_control/test_gripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,3 @@ def test_reload_instrument_cal_ot3(fake_offset: "GripperCalibrationOffset") -> N
assert new_gripper == old_gripper
# we said upstream could skip
assert skip
# only pipette offset has been updated
assert new_gripper._calibration_offset == new_cal
2 changes: 0 additions & 2 deletions api/tests/opentrons/hardware_control/test_pipette.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,5 +399,3 @@ def test_reload_instrument_cal_ot3(
assert skipped
# it's the same pipette
assert new_pip == old_pip
# only pipette offset has been updated
assert new_pip._pipette_offset == new_cal

0 comments on commit a882af1

Please sign in to comment.