Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): reconfigure instrument cache after a firmware update #14502

Conversation

ahiuchingau
Copy link
Contributor

Overview

The hardware controller sets the proper motor currents for each axis when the instruments are cached. Whenever a subsystem gets rebooted/updated, the motor current setting is lost. This means we must re-configure the instrument cache after we update a firmware, to make sure the subsystem motor is set up correctly.

@ahiuchingau ahiuchingau requested a review from a team as a code owner February 15, 2024 20:03
@ahiuchingau ahiuchingau changed the base branch from edge to chore_release-7.2.0 February 15, 2024 20:03
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (23146ba) 67.77% compared to head (5d96dee) 67.77%.
Report is 7 commits behind head on chore_release-7.2.0.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.2.0   #14502   +/-   ##
====================================================
  Coverage                67.77%   67.77%           
====================================================
  Files                     2519     2519           
  Lines                    72017    72017           
  Branches                  9274     9274           
====================================================
  Hits                     48809    48809           
  Misses                   20993    20993           
  Partials                  2215     2215           
Flag Coverage Δ
g-code-testing 92.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
api/src/opentrons/hardware_control/ot3api.py 79.87% <ø> (ø)

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the finally thing!

@@ -523,6 +524,7 @@ async def update_firmware(
message="Update failed because of uncaught error",
wrapping=[PythonException(e)],
) from e
self._configured_since_update = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably wants to be in a finally:

@sfoster1 sfoster1 merged commit 3e857d7 into chore_release-7.2.0 Feb 26, 2024
21 of 22 checks passed
@sfoster1 sfoster1 deleted the fix_do-not-skip-configure-instr-after-firmware-update branch February 26, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants