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(api): expose versions of connected micros #12470

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

sfoster1
Copy link
Member

@sfoster1 sfoster1 commented Apr 11, 2023

Implement the get_fw_version method of OT3API to return a stringified representation of all unique firmware versions for attached microcontrollers on the system.

This is a not-great way of exposing this data programmatically, but this element is only used for display purposes so I think it's ok. In all normal cases (i.e. except during update) this will only return a single version.

Closes RCORE-731

Testing

  • Put on a robot and check that the app displays the correct firmware version
  • Attach a pipette that has the wrong firmware and check that the firmware version is displayed

@sfoster1 sfoster1 requested a review from a team as a code owner April 11, 2023 14:47
@sfoster1 sfoster1 requested review from a team April 11, 2023 14:47
@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Merging #12470 (b1f0825) into edge (f9e3024) will decrease coverage by 0.36%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #12470      +/-   ##
==========================================
- Coverage   73.81%   73.45%   -0.36%     
==========================================
  Files        2246     1498     -748     
  Lines       61740    49150   -12590     
  Branches     6430     2991    -3439     
==========================================
- Hits        45574    36104    -9470     
+ Misses      14653    12590    -2063     
+ Partials     1513      456    -1057     
Flag Coverage Δ
notify-server 89.13% <ø> (ø)

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

Impacted Files Coverage Δ
...entrons/hardware_control/backends/ot3controller.py 65.81% <ø> (+0.13%) ⬆️
...pentrons/hardware_control/backends/ot3simulator.py 88.05% <ø> (ø)
...rc/opentrons/hardware_control/backends/ot3utils.py 91.89% <ø> (ø)
api/src/opentrons/hardware_control/ot3api.py 79.41% <ø> (+0.17%) ⬆️

... and 748 files with indirect coverage changes

Copy link
Contributor

@Laura-Danielle Laura-Danielle left a comment

Choose a reason for hiding this comment

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

Code changes look good, but did have one question about how we handle bootloader ids.

@@ -68,6 +69,25 @@
OT3SubSystem.gripper: NodeId.gripper,
}

NODEID_SUBSYSTEM: Dict[NodeId, OT3SubSystem] = {
NodeId.gantry_x: OT3SubSystem.gantry_x,
NodeId.gantry_x_bootloader: OT3SubSystem.gantry_x,
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess not super relevant to this PR, but should we be throwing an error somewhere in the hardware controller if one of the microcontrollers is in a bootloader state? Or, at the very least, should we not mask whether a node id is a bootloader?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes we should. i think we need to overhaul that at some point.

Implement the get_fw_version method of OT3API to return a stringified
representation of all unique firmware versions for attached
microcontrollers on the system.

This is a not-great way of exposing this data programmatically, but this
element is only used for display purposes so I think it's ok. In all
normal cases (i.e. except during update) this will only return a single
version.

Closes RCORE-731
@sfoster1 sfoster1 force-pushed the chore_add-fw-version-to-health branch from 434f27c to 62c5de3 Compare April 12, 2023 13:45
@sfoster1
Copy link
Member Author

Screenshot 2023-04-12 at 10 15 04 AM

@sfoster1
Copy link
Member Author

Screenshot 2023-04-12 at 10 16 41 AM

when firmware is mismatched

@sfoster1 sfoster1 merged commit a502413 into edge Apr 12, 2023
@sfoster1 sfoster1 deleted the chore_add-fw-version-to-health branch April 12, 2023 14:47
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