-
Notifications
You must be signed in to change notification settings - Fork 175
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(robot-server): correct the data returned from instruments endpoint #12067
Conversation
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.
👍
Codecov Report
@@ Coverage Diff @@
## edge #12067 +/- ##
==========================================
+ Coverage 73.95% 74.02% +0.06%
==========================================
Files 2194 2202 +8
Lines 60718 61067 +349
Branches 6428 6526 +98
==========================================
+ Hits 44907 45204 +297
- Misses 14293 14321 +28
- Partials 1518 1542 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -498,6 +498,12 @@ async def cache_instruments( | |||
await self.cache_pipette( | |||
mount, cast(OT3AttachedPipette, instrument_data), req_instr_name | |||
) | |||
if self._gripper_handler.gripper and OT3Mount.GRIPPER not in found.keys(): |
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.
You could do something like this
for mount in OT3Mount:
if mount in found.keys() and mount == OT3Mount.GRIPPER:
await self.cache_gripper(cast(AttachedGripper, found[mount]))
elif mount in found.keys():
req_instr_name = checked_require.get(mount, None)
await self.cache_pipette(
mount, cast(OT3AttachedPipette, found[mount]), req_instr_name
)
elif mount == OT3Mount.GRIPPER:
await self._gripper_handler.reset()
else:
self._pipette_handler.hardware_instruments[mount] = None
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.
Tested attaching/detaching on all mounts on Bubble, worked as expected
* edge: (116 commits) feat(system-server): add sqlite database and barebones HTTP server (#12085) feat(ot3): add enableOT3FirmwareUpdates feature flag to gate firmware update functionality. (#12102) feat(app): add bare bones hardware section to protocol details (#12099) feat(app): Support failed calibrations in the calibration wizard (#12092) refactor(docs): clean up Versioning page (#12084) refactor(robot-server): Make run and protocol limits configurable at launch (#12094) feat(app): add robotServerVersion to display the current robot software version (#12096) fix(hardware): do not track tip motor positions (#12093) feat(engine): allow calibrateGripper command to save calibration data (#12046) feat(app, api-client, react-api-client): delete POC TLC calibration data from overflow menu (#12075) fix(api): actually update OT3 instrument calibration offset in cache instrument (#12089) fix(robot-server): correct the data returned from instruments endpoint (#12067) feat(api): add thermocycler plate lift to hardware controller (#12068) fix(app): reference moduleId from result not params (#12077) feat(app): create ODD protocol setup page (#12071) refactor(api): Deprecate presses and increment args when using PAPI pick_up_tip (#12079) fix(ot3): handle multiple responses for a tip action request (#12083) refactor(api): touch tip implementation for PAPIv2 engine core (#12053) refactor(app): Remove ssid parameter from OnDeviceRouteParams (#11930) fix(api): fix broken test in the api hardware controller (#12080) ...
Overview
Fixes the issue where
jawState
andgripperModel
were returning enums instead of strings/ values.Also fixes the issue of instrument detachments not updating correctly in the instruments cache.
Test Plan
Tested on an OT3
Review requests
GripperModel
and right now it's in a bit of incomplete state pending the decision on whether to use string enums or not. Until then it would contain a bit of a redundant code related to stringification of the models.Risk assessment
None. The change is according to the schema & client expectations.