From 685d0fb8003f186958dd445f1bd6fd89614066db Mon Sep 17 00:00:00 2001 From: ahiuchingau <20424172+ahiuchingau@users.noreply.github.com> Date: Thu, 27 Jul 2023 17:13:42 -0400 Subject: [PATCH] update before homing --- api/src/opentrons/hardware_control/ot3api.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/api/src/opentrons/hardware_control/ot3api.py b/api/src/opentrons/hardware_control/ot3api.py index 465a161801d..3b5046f115e 100644 --- a/api/src/opentrons/hardware_control/ot3api.py +++ b/api/src/opentrons/hardware_control/ot3api.py @@ -1209,18 +1209,13 @@ async def _retrieve_home_position() -> Tuple[ # G, Q should be handled in the backend through `self._home()` assert axis not in [Axis.G, Axis.Q] + # ensure stepper position can be updated after boot + await self.engage_axes([axis]) + await self._update_position_estimation([axis]) + # refresh motor and encoder statuses after position estimation update motor_ok = self._backend.check_motor_status([axis]) encoder_ok = self._backend.check_encoder_status([axis]) - # we can update the motor position if the encoder position is valid - if encoder_ok and not motor_ok: - # ensure stepper position can be updated after boot - await self.engage_axes([axis]) - await self._update_position_estimation([axis]) - # refresh motor and encoder statuses after position estimation update - motor_ok = self._backend.check_motor_status([axis]) - encoder_ok = self._backend.check_encoder_status([axis]) - # we can move to safe home distance! if encoder_ok and motor_ok: origin, target_pos = await _retrieve_home_position()