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

feat(thermocycler): check closed lid sensor when a move finishes #449

Merged
merged 14 commits into from
Mar 19, 2024

Conversation

caila-marashaj
Copy link
Contributor

@caila-marashaj caila-marashaj commented Feb 27, 2024

Overview

Currently, the thermocycler's optical switches are not checked after opening or closing the lid to make sure that the action was performed successfully. In the case of closing the lid, we want to make sure that there isn't any extra labware obstructing the lid from closing before moving forward with a protocol.

This resolves https://opentrons.atlassian.net/browse/RQA-2303

Changelog

  • create an UNEXPECTED_LID_STATE_ERROR
  • edit motor_task.hpp to throw said error after handling a LidStepperComplete with lid status CLOSE_OVERDRIVE, if the lid closed sensor is not triggered
  • update the tests
  • some CMake changes to stop gcc's yelling

@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 82.20%. Comparing base (ebc4bcf) to head (e160e8c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge     #449   +/-   ##
=======================================
  Coverage   82.20%   82.20%           
=======================================
  Files          75       75           
  Lines        6809     6812    +3     
=======================================
+ Hits         5597     5600    +3     
  Misses       1212     1212           
Files Coverage Δ
stm32-modules/include/common/core/xt1511.hpp 87.09% <ø> (ø)
...ude/thermocycler-gen2/thermocycler-gen2/errors.hpp 100.00% <ø> (ø)
...thermocycler-gen2/thermocycler-gen2/motor_task.hpp 87.72% <100.00%> (+0.22%) ⬆️
...rmocycler-gen2/thermocycler-gen2/plate_control.hpp 90.90% <ø> (ø)
...ycler-gen2/thermocycler-gen2/tmc2130_registers.hpp 87.50% <ø> (ø)
...32-modules/thermocycler-gen2/src/plate_control.cpp 90.50% <ø> (ø)
stm32-modules/thermocycler-gen2/src/errors.cpp 28.30% <0.00%> (-0.55%) ⬇️

@caila-marashaj caila-marashaj marked this pull request as ready for review March 4, 2024 19:39
@caila-marashaj caila-marashaj requested a review from a team March 4, 2024 19:39
@@ -1289,8 +1289,10 @@ class MotorTask {
motor_util::LidStepper::Position::CLOSED;
// The overall lid state machine can advance now
error = handle_lid_state_end(policy);
// TODO(Frank, Mar-7-2022) check if the lid didn't make it in
// all the way
// if the lid isn't actually closed, overwrite error status
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to do this before the handle_lid_state_end call above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I figured it would be easier to overwrite the error value after that function is done, since inside of its scope it doesn't know the desired status of the lid, which in this case is OVERDRIVE

@caila-marashaj caila-marashaj changed the title throw an error if a move finishes without triggering a sensor feat(thermocycler): check closed lid sensor when a move finishes Mar 18, 2024
@caila-marashaj caila-marashaj requested a review from a team March 18, 2024 22:13
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 to me, nice!

@caila-marashaj caila-marashaj merged commit b703389 into edge Mar 19, 2024
11 checks passed
@caila-marashaj caila-marashaj deleted the lid-stepper-failed-error branch March 19, 2024 15:20
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.

5 participants