-
Notifications
You must be signed in to change notification settings - Fork 184
fix(api): sync statusbar state with flex stacker on startup and when modules are plugged in. #18119
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
Conversation
…modules are plugged in.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #18119 +/- ##
=======================================
Coverage 25.43% 25.43%
=======================================
Files 3017 3018 +1
Lines 234683 234684 +1
Branches 20162 20166 +4
=======================================
+ Hits 59692 59693 +1
Misses 174975 174975
Partials 16 16
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on this side
GCODE.GET_TOF_SENSOR_STATUS.build_command().add_element(sensor.name) | ||
) | ||
return self.parse_tof_sensor_status(response) | ||
# This can fail because the TOF sensor task cannot respond to messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the cache just fills up? do we then get a bajillion responses once the sensor initializes? we should change something on the firmware side so this doesn't happen IMO - maybe a cheater in the sensor input queue handler that can ask some mutex what's happening
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense!
Not in the scope of this PR, but this is making me wonder if we should try consolidate all of these info (limit switch, initialized, etc) in one single GetStatus
message since we'll be polling so much so often... 🤔
I would not be opposed to that, although this is only polling while we initialize the stackers. Once they initialize we only poll the door state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty!
Overview
The Flex now syncs the status bar state with the flex stacker led lights when a statusbar event is emitted; however, we need to sync statusbar state when the Flex starts and when a module is added. With this pull request, we now sync the status bar state when the robot server starts up and when a module is connected. This pull request goes in conjunction with this Opentrons/opentrons-modules#522 pull request, which fixes some fundamental issues with the UI task.
Test Plan and Hands on Testing
Changelog
get_tof_sensor_status
in try catch to account TOF sensors init on the Flex StackersGCacheFull ERR004
and add FS_TOF_INIT_TIMEOUT 5s timeout when getting tof sensor statusget_status_bar_enabled
to check if the statusbar is enabled or not for emitting statusbar events._initialized_callback
to the FlexStackerReader so we can sync the statusbar state once the Flex Stacker is initialized.Review requests
Risk assessment
Low, unreleased