Skip to content

Commit

Permalink
Pathfinder patch (#251)
Browse files Browse the repository at this point in the history
* Bypass platform space conversion with pathfinder

* Restrict python version to 3.11
  • Loading branch information
kjy5 authored Oct 31, 2023
1 parent 00f15b9 commit 0fcf28a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/autoformat-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: 🐍 Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.11'
cache: 'pip'

- name: 📦 Install dependencies
Expand Down
6 changes: 6 additions & 0 deletions src/ephys_link/platform_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ def get_pos(self, manipulator_id: str) -> com.PositionalOutputData:

# Get position and convert to unified space
manipulator_pos = self._get_pos(manipulator_id)

# Shortcut return for Pathfinder
if self.num_axes == -1:
return manipulator_pos

# Error check and convert position to unified space
if manipulator_pos["error"] != "":
return manipulator_pos
return com.PositionalOutputData(
Expand Down
1 change: 1 addition & 0 deletions src/ephys_link/platforms/new_scale_pathfinder_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def __init__(self, port: int = 8080) -> None:
super().__init__()

self.num_axes = -1
self.dimensions = [15, 15, 15]

self.port = port

Expand Down

0 comments on commit 0fcf28a

Please sign in to comment.