ezmsg-peripheraldevice 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/PKG-INFO +1 -1
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/examples/mouse_poll.py +1 -2
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/src/ezmsg/peripheraldevice/__version__.py +2 -2
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/src/ezmsg/peripheraldevice/mouse.py +4 -4
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/tests/test_mouse.py +3 -3
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.github/workflows/docs.yml +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.github/workflows/python-publish.yml +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.github/workflows/python-tests.yml +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.gitignore +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.pre-commit-config.yaml +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/LICENSE +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/README.md +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/Makefile +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/make.bat +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/source/_templates/autosummary/module.rst +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/source/api/index.rst +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/source/conf.py +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/source/index.md +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/examples/mouse_listen.py +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/pyproject.toml +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/src/ezmsg/peripheraldevice/__init__.py +0 -0
- {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/tests/test_example.py +0 -0
|
@@ -15,7 +15,7 @@ import ezmsg.core as ez
|
|
|
15
15
|
from ezmsg.baseproc import Clock, ClockSettings
|
|
16
16
|
from ezmsg.util.debuglog import DebugLog
|
|
17
17
|
|
|
18
|
-
from ezmsg.peripheraldevice import MousePoller
|
|
18
|
+
from ezmsg.peripheraldevice import MousePoller
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class MousePollSettings(ez.Settings):
|
|
@@ -40,7 +40,6 @@ class MousePollSystem(ez.Collection):
|
|
|
40
40
|
|
|
41
41
|
def configure(self) -> None:
|
|
42
42
|
self.CLOCK.apply_settings(ClockSettings(dispatch_rate=self.SETTINGS.poll_rate))
|
|
43
|
-
self.MOUSE.apply_settings(MousePollerSettings())
|
|
44
43
|
|
|
45
44
|
def network(self) -> ez.NetworkDefinition:
|
|
46
45
|
return (
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0,
|
|
31
|
+
__version__ = version = '0.2.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 0)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
{ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/src/ezmsg/peripheraldevice/mouse.py
RENAMED
|
@@ -61,10 +61,10 @@ class MousePollerTransformer(
|
|
|
61
61
|
data=np.zeros((1, 2), dtype=np.float64),
|
|
62
62
|
dims=["time", "ch"],
|
|
63
63
|
axes={
|
|
64
|
-
"time": AxisArray.
|
|
65
|
-
data=np.array([message.offset]),
|
|
66
|
-
dims=["time"],
|
|
64
|
+
"time": AxisArray.LinearAxis(
|
|
67
65
|
unit="s",
|
|
66
|
+
gain=message.gain,
|
|
67
|
+
offset=message.offset,
|
|
68
68
|
),
|
|
69
69
|
"ch": AxisArray.CoordinateAxis(
|
|
70
70
|
data=np.array(["x", "y"]),
|
|
@@ -82,7 +82,7 @@ class MousePollerTransformer(
|
|
|
82
82
|
data = np.array([[pos[0], pos[1]]], dtype=np.float64)
|
|
83
83
|
time_axis = replace(
|
|
84
84
|
self._state.template.axes["time"],
|
|
85
|
-
|
|
85
|
+
offset=message.offset,
|
|
86
86
|
)
|
|
87
87
|
|
|
88
88
|
return replace(
|
|
@@ -83,8 +83,8 @@ class TestMousePollerTransformer:
|
|
|
83
83
|
|
|
84
84
|
# Check that time axis offset matches input
|
|
85
85
|
time_axis = result.axes["time"]
|
|
86
|
-
assert isinstance(time_axis, AxisArray.
|
|
87
|
-
assert time_axis.
|
|
86
|
+
assert isinstance(time_axis, AxisArray.LinearAxis)
|
|
87
|
+
assert time_axis.offset == 1.5
|
|
88
88
|
|
|
89
89
|
@patch("ezmsg.peripheraldevice.mouse.Controller")
|
|
90
90
|
def test_multiple_calls(self, mock_controller_class):
|
|
@@ -105,7 +105,7 @@ class TestMousePollerTransformer:
|
|
|
105
105
|
assert result.data.shape == (1, 2)
|
|
106
106
|
assert np.all(np.isfinite(result.data))
|
|
107
107
|
# Time axis should have offset matching clock tick
|
|
108
|
-
assert result.axes["time"].
|
|
108
|
+
assert result.axes["time"].offset == i * 0.1
|
|
109
109
|
# Data should match mock position
|
|
110
110
|
np.testing.assert_array_equal(result.data[0], [i * 10, i * 20])
|
|
111
111
|
|
|
File without changes
|
{ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.github/workflows/python-publish.yml
RENAMED
|
File without changes
|
{ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.github/workflows/python-tests.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/src/ezmsg/peripheraldevice/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|