Skip to content

Commit

Permalink
Update to wei v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
caseystone committed Aug 21, 2024
1 parent 0722b7a commit 1eb447e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ad-sdl/wei:v0.5.9
FROM ghcr.io/ad-sdl/wei:v0.6.0

LABEL org.opencontainers.image.source=https://github.com/AD-SDL/hudson_platecrane_module
LABEL org.opencontainers.image.description="Drivers and REST API's for the Hudson Platecrane and Sciclops robots"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "hudson_platecrane_module"
version = "1.4.1"
version = "1.5.0"
description = "Driver for the Platecrane and Sciclops"
authors = [
{name = "Ryan D. Lewis", email="[email protected]"},
Expand All @@ -16,7 +16,7 @@ dependencies = [
"pyusb",
"libusb",
"pyserial",
"ad_sdl.wei",
"ad_sdl.wei>=0.6.0",
"pydantic>=2.7",
"pytest"
]
Expand Down
12 changes: 6 additions & 6 deletions src/platecrane_rest_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from platecrane_driver.platecrane_driver import PlateCrane
from typing_extensions import Annotated
from wei.modules.rest_module import RESTModule
from wei.types.step_types import StepResponse
from wei.types.step_types import StepResponse, StepSucceeded
from wei.utils import extract_version

rest_module = RESTModule(
Expand Down Expand Up @@ -57,7 +57,7 @@ def transfer(
height_offset=int(height_offset),
has_lid=has_lid,
)
return StepResponse.step_succeeded("Transfer complete")
return StepSucceeded()


@rest_module.action()
Expand All @@ -82,7 +82,7 @@ def remove_lid(
plate_type=plate_type,
height_offset=height_offset,
)
return StepResponse.step_succeeded("Removed lid")
return StepSucceeded()


@rest_module.action()
Expand All @@ -107,7 +107,7 @@ def replace_lid(
plate_type=plate_type,
height_offset=height_offset,
)
return StepResponse.step_succeeded("Replaced lid")
return StepSucceeded()


@rest_module.action()
Expand All @@ -117,7 +117,7 @@ def move_safe(
"""This action moves the arm to a safe location (the location named "Safe")."""
platecrane: PlateCrane = state.platecrane
platecrane.move_location("Safe")
return StepResponse.step_succeeded("Moved to the Safe position")
return StepSucceeded()


@rest_module.action()
Expand All @@ -128,7 +128,7 @@ def set_speed(
"""This action sets the speed at which the plate crane arm moves (as a percentage)"""
platecrane: PlateCrane = state.platecrane
platecrane.set_speed(speed=speed)
return StepResponse.step_succeeded(f"Set speed to {speed}")
return StepSucceeded()


if __name__ == "__main__":
Expand Down
8 changes: 4 additions & 4 deletions src/sciclops_rest_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing_extensions import Annotated
from wei.modules.rest_module import RESTModule
from wei.types.module_types import ModuleStatus
from wei.types.step_types import StepResponse
from wei.types.step_types import StepSucceeded
from wei.utils import extract_version

rest_module = RESTModule(
Expand Down Expand Up @@ -48,14 +48,14 @@ def status(state: State):
"""Action that forces the sciclops to check its status."""
sciclops: SCICLOPS = state.sciclops
sciclops.get_status()
return StepResponse.step_succeeded(action_msg="Succesfully got status")
return StepSucceeded()


@rest_module.action()
def home(state: State):
"""Homes the sciclops"""
state.sciclops.home()
return StepResponse.step_succeeded()
return StepSucceeded()


@rest_module.action(name="get_plate")
Expand All @@ -67,7 +67,7 @@ def get_plate(
):
"""Get a plate from a stack position and move it to transfer point (or trash)"""
state.sciclops.get_plate(pos, lid, trash)
return StepResponse.step_succeeded()
return StepSucceeded()


rest_module.start()

0 comments on commit 1eb447e

Please sign in to comment.