Skip to content

Commit

Permalink
Merge branch 'main' into clld_probe_y_position_using_channel
Browse files Browse the repository at this point in the history
  • Loading branch information
BioCam authored Jan 7, 2025
2 parents 59375df + 140cd81 commit 1483749
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"python.testing.pytestEnabled": true,
"python.testing.autoTestDiscoverOnSaveEnabled": true,
"editor.rulers": [100],
"editor.formatOnSave": true,
"files.exclude": {
"**/__pycache__": true
},
Expand Down
4 changes: 4 additions & 0 deletions docs/user_guide/rpi.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ You can use PLR on any operating system, but Raspberry Pis can be a good choice
```
SUBSYSTEM=="usb", MODE="0666"
```
- Reload the udev rules with
```bash
sudo udevadm control --reload-rules && sudo udevadm trigger
```

```{warning}
This adds permissions to all USB devices. This is useful when you control the device and don't want to worry when plugging in new devices, but it could be a security risk if the machine is shared with untrusted users. See [udev documentation](https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html) for more granular control.
Expand Down
2 changes: 2 additions & 0 deletions pylabrobot/resources/carrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ def assign_child_resource(
"PlateHolder can only store Plate, PlateAdapter or ResourceStack "
+ f"resources, not {type(resource)}"
)
if isinstance(resource, Plate) and resource.plate_type != "skirted":
raise ValueError("PlateHolder can only store plates that are skirted")
return super().assign_child_resource(resource, location, reassign)

def _get_sinking_depth(self, resource: Resource) -> Coordinate:
Expand Down
2 changes: 1 addition & 1 deletion pylabrobot/resources/hamilton/hamilton_deck_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_summary(self):
│ ├── <empty>
(31) ├── teaching_carrier Resource (775.000, 051.800, 100.000)
│ ├── teaching_tip_rack TipRack (780.900, 452.100, 100.000)
│ ├── teaching_tip_rack TipRack (780.900, 461.100, 100.000)
(32) ├── trash Trash (800.000, 190.600, 137.100)
"""[1:]
Expand Down
11 changes: 7 additions & 4 deletions pylabrobot/resources/hamilton/hamilton_decks.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,11 @@ def print_resource_line(resource: Resource, depth=0) -> str:
r_summary += resource.__class__.__name__.ljust(type_column_length)

# Print resource location
location = resource.get_absolute_location()
r_summary += str(location).ljust(location_column_length)
try:
location = str(resource.get_absolute_location())
except NoLocationError:
location = "Undefined"
r_summary += location.ljust(location_column_length)

return r_summary

Expand Down Expand Up @@ -421,12 +424,12 @@ def __init__(
size_x=9 * 8,
size_y=9,
size_z=50.4,
ordered_items={f"A{i}": tip_spots[i] for i in range(8)},
ordered_items={f"{letter}1": tip_spots[idx] for idx, letter in enumerate("HGFEDCBA")},
with_tips=True,
model="hamilton_teaching_tip_rack",
)
teaching_carrier.assign_child_resource(
teaching_tip_rack, location=Coordinate(x=5.9, y=400.3, z=0)
teaching_tip_rack, location=Coordinate(x=5.9, y=409.3, z=0)
)
self.assign_child_resource(
teaching_carrier,
Expand Down

0 comments on commit 1483749

Please sign in to comment.