From 5e4d97a5cb54a417c5b05fd533a85a9e76e585ba Mon Sep 17 00:00:00 2001 From: Brayan Almonte Date: Tue, 30 Jan 2024 21:48:39 -0500 Subject: [PATCH] feat(api,hardware,robot-server): enable firmware updates for the HEPA/UV. (#14386) * feat(api,hardware,robot-server): enable firmware updates for the HEPA/UV. * add hepa-uv to update_fw.py script --- api/src/opentrons/hardware_control/backends/ot3utils.py | 1 + api/src/opentrons/hardware_control/types.py | 1 + hardware/opentrons_hardware/firmware_update/utils.py | 3 +++ hardware/opentrons_hardware/scripts/update_fw.py | 1 + robot-server/robot_server/subsystems/models.py | 3 +++ 5 files changed, 9 insertions(+) diff --git a/api/src/opentrons/hardware_control/backends/ot3utils.py b/api/src/opentrons/hardware_control/backends/ot3utils.py index 967d4640a95..3cc4b75bc76 100644 --- a/api/src/opentrons/hardware_control/backends/ot3utils.py +++ b/api/src/opentrons/hardware_control/backends/ot3utils.py @@ -80,6 +80,7 @@ SubSystem.pipette_left: NodeId.pipette_left, SubSystem.pipette_right: NodeId.pipette_right, SubSystem.gripper: NodeId.gripper, + SubSystem.hepa_uv: NodeId.hepa_uv, } NODEID_SUBSYSTEM = {node: subsystem for subsystem, node in SUBSYSTEM_NODEID.items()} diff --git a/api/src/opentrons/hardware_control/types.py b/api/src/opentrons/hardware_control/types.py index 67d2307e589..6724e2dc93c 100644 --- a/api/src/opentrons/hardware_control/types.py +++ b/api/src/opentrons/hardware_control/types.py @@ -254,6 +254,7 @@ class SubSystem(enum.Enum): gripper = 5 rear_panel = 6 motor_controller_board = 7 + hepa_uv = 8 def __str__(self) -> str: return self.name diff --git a/hardware/opentrons_hardware/firmware_update/utils.py b/hardware/opentrons_hardware/firmware_update/utils.py index 42a8c99e464..28a74aedd94 100644 --- a/hardware/opentrons_hardware/firmware_update/utils.py +++ b/hardware/opentrons_hardware/firmware_update/utils.py @@ -27,6 +27,7 @@ NodeId.gantry_x: "c1", NodeId.gantry_y: "c1", NodeId.gripper: "c1", + NodeId.hepa_uv: "b1", USBTarget.rear_panel: "b1", } @@ -50,6 +51,7 @@ class FirmwareUpdateType(Enum): pipettes_multi = 5 pipettes_96 = 6 rear_panel = 7 + hepa_uv = 8 unknown = -1 unknown_no_subtype = -2 unknown_no_revision = -3 @@ -89,6 +91,7 @@ def from_node(cls, node: NodeId) -> "FirmwareUpdateType": NodeId.gantry_x: cls.gantry_x, NodeId.gantry_y: cls.gantry_y, NodeId.gripper: cls.gripper, + NodeId.hepa_uv: cls.hepa_uv, } return lookup[node.application_for()] diff --git a/hardware/opentrons_hardware/scripts/update_fw.py b/hardware/opentrons_hardware/scripts/update_fw.py index 97e48cae3c0..491ad672420 100644 --- a/hardware/opentrons_hardware/scripts/update_fw.py +++ b/hardware/opentrons_hardware/scripts/update_fw.py @@ -48,6 +48,7 @@ "pipette-left": NodeId.pipette_left, "pipette-right": NodeId.pipette_right, "gripper": NodeId.gripper, + "hepa-uv": NodeId.hepa_uv, "rear-panel": USBTarget.rear_panel, } diff --git a/robot-server/robot_server/subsystems/models.py b/robot-server/robot_server/subsystems/models.py index 4c909f616be..88c497e769d 100644 --- a/robot-server/robot_server/subsystems/models.py +++ b/robot-server/robot_server/subsystems/models.py @@ -26,6 +26,7 @@ class SubSystem(enum.Enum): pipette_right = "pipette_right" gripper = "gripper" rear_panel = "rear_panel" + hepa_uv = "hepa_uv" motor_controller_board = "motor_controller_board" @classmethod @@ -46,6 +47,7 @@ def to_hw(self) -> HWSubSystem: HWSubSystem.pipette_right: SubSystem.pipette_right, HWSubSystem.rear_panel: SubSystem.rear_panel, HWSubSystem.gripper: SubSystem.gripper, + HWSubSystem.hepa_uv: SubSystem.hepa_uv, HWSubSystem.motor_controller_board: SubSystem.motor_controller_board, } @@ -57,6 +59,7 @@ def to_hw(self) -> HWSubSystem: SubSystem.pipette_right: HWSubSystem.pipette_right, SubSystem.rear_panel: HWSubSystem.rear_panel, SubSystem.gripper: HWSubSystem.gripper, + SubSystem.hepa_uv: HWSubSystem.hepa_uv, SubSystem.motor_controller_board: HWSubSystem.motor_controller_board, }