File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
robot_server/robot/calibration/pipette_offset
tests/robot/calibration/pipette_offset Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -402,18 +402,15 @@ async def move_to_deck(self):
402
402
self ._should_perform_tip_length = False
403
403
404
404
async def move_to_point_one (self ):
405
- assert self ._z_height_reference is not None , \
406
- "saveOffset has not been called yet"
407
405
target_loc = Location (self ._cal_ref_point , None )
408
- target = target_loc .move (
409
- point = Point (0 , 0 , self ._z_height_reference ))
410
- await self ._move (target )
406
+ await self ._move (target_loc )
411
407
412
408
async def save_offset (self ):
413
409
cur_pt = await self .get_current_point (critical_point = None )
414
410
current_state = self ._sm .current_state
415
411
if current_state == self ._sm .state .joggingToDeck :
416
- self ._z_height_reference = cur_pt .z
412
+ updated_z = Point (0 , 0 , cur_pt .z )
413
+ self ._cal_ref_point = self ._cal_ref_point + updated_z
417
414
elif current_state == self ._sm .state .savingPointOne :
418
415
if self ._hw_pipette .config .channels > 1 :
419
416
cur_pt = await self .get_current_point (
Original file line number Diff line number Diff line change @@ -469,6 +469,11 @@ async def test_save_custom_tiprack_def(
469
469
470
470
async def test_save_pipette_calibration (mock_user_flow , mock_save_pipette ):
471
471
uf = mock_user_flow
472
+ uf ._sm .set_state (uf ._sm .state .joggingToDeck )
473
+ assert uf ._cal_ref_point == Point (12.13 , 9.0 , 0.0 )
474
+ await uf .jog (vector = (0 , 0 , 10 ))
475
+ await uf .save_offset ()
476
+ assert uf ._cal_ref_point == Point (12.13 , 9.0 , 10.0 )
472
477
473
478
uf ._sm .set_state (uf ._sm .state .savingPointOne )
474
479
await uf ._hardware .move_to (
You can’t perform that action at this time.
0 commit comments