-
Notifications
You must be signed in to change notification settings - Fork 178
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(api,hardware): add hepa/uv config/control commands to api. #14489
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## edge #14489 +/- ##
==========================================
+ Coverage 67.79% 67.82% +0.02%
==========================================
Files 2518 2519 +1
Lines 72017 72082 +65
Branches 9244 9244
==========================================
+ Hits 48826 48887 +61
- Misses 20989 20993 +4
Partials 2202 2202
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Functionality looks good but let's get some tests on the hepa_uv_settings.py
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.
Also we need some stubs in ot3simulator
return await set_hepa_uv_state_fw(self._messenger, light_on, timeout_s) | ||
|
||
async def get_hepa_uv_state(self) -> Optional[HepaUVState]: | ||
res = await get_hepa_uv_state_fw(self._messenger) |
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.
Are you not just returning res here because of linter complaining?
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.
its to separate opentrons_hardware dataclasses from opentrons.hardware_control ones.
return await self._backend.get_hepa_fan_state() | ||
|
||
async def set_hepa_uv_state( | ||
self, turn_on: bool = False, timeout_s: int = 900 |
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.
Do we need this long of a timeout?
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.
yeah 900s (15m) is the default uv light timeout
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.
can we call it like dose_duration
or something?
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 to me, though I agree with Peter that we maybe need a better name for timeout
- it looks at first glance like it's a time-before-error parameter like other timeouts.
return await self._backend.get_hepa_fan_state() | ||
|
||
async def set_hepa_uv_state( | ||
self, turn_on: bool = False, timeout_s: int = 900 |
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.
can we call it like dose_duration
or something?
…means how long to turn the uv light on for.
Overview
We added can messages to control the hepa/uv in this pr (Opentrons/opentrons:#14452), now we want to use those messages from the hardware controller and API. This pr adds the hooks to these can messages so they can be used from repl.
Closes: RET-1424
Test Plan
Changelog
Review requests
Risk assessment
low, unreleased
Todo