scirodev 0.3.1__tar.gz → 0.4.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.
- {scirodev-0.3.1 → scirodev-0.4.0}/PKG-INFO +1 -1
- {scirodev-0.3.1 → scirodev-0.4.0}/pyproject.toml +1 -1
- {scirodev-0.3.1 → scirodev-0.4.0}/sciro/floorpro.py +1 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/sciro/pump.py +18 -11
- {scirodev-0.3.1 → scirodev-0.4.0}/scirodev.egg-info/PKG-INFO +1 -1
- {scirodev-0.3.1 → scirodev-0.4.0}/LICENSE +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/README.md +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/sciro/__init__.py +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/sciro/_common.py +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/sciro/hubs.py +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/sciro/iodevices.py +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/sciro/parameters.py +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/sciro/py.typed +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/scirodev/__init__.py +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/scirodev/cli.py +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/scirodev.egg-info/SOURCES.txt +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/scirodev.egg-info/dependency_links.txt +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/scirodev.egg-info/entry_points.txt +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/scirodev.egg-info/requires.txt +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/scirodev.egg-info/top_level.txt +0 -0
- {scirodev-0.3.1 → scirodev-0.4.0}/setup.cfg +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "scirodev"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.4.0"
|
|
8
8
|
description = "PeakHub / sciro extensions to Pybricks: typed API stubs (sciro.*) and hub tooling on top of pybricksdev"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -153,24 +153,24 @@ class ColorSensor(_Stream):
|
|
|
153
153
|
"""set_integration(atime) -- TCS3400 ATIME register 0 .. 255: (256 - atime) * 2.78 ms."""
|
|
154
154
|
|
|
155
155
|
|
|
156
|
-
class
|
|
157
|
-
"""BNO086
|
|
156
|
+
class Gyro(_Stream):
|
|
157
|
+
"""Gyro (BNO086) on an extension port of a PUMP device: roll, pitch, yaw in degrees.
|
|
158
158
|
|
|
159
|
-
``
|
|
160
|
-
same class. The heading offset lives on the hub:
|
|
161
|
-
the current yaw read as the given angle.
|
|
159
|
+
``Gyro(port, ext_port)`` opens it directly; :meth:`FloorPro.gyro` returns the
|
|
160
|
+
same class (``IMU`` is an alias). The heading offset lives on the hub:
|
|
161
|
+
:meth:`reset_heading` makes the current yaw read as the given angle.
|
|
162
162
|
"""
|
|
163
163
|
|
|
164
164
|
ext_port: int
|
|
165
165
|
|
|
166
166
|
def __init__(self, port: Union[_Port, PUMPDevice], ext_port: int = 2):
|
|
167
|
-
"""
|
|
167
|
+
"""Gyro(port, ext_port=ExtPort.EXT2)
|
|
168
168
|
|
|
169
169
|
Arguments:
|
|
170
|
-
port (Port): Hub port of the PUMP device carrying the
|
|
170
|
+
port (Port): Hub port of the PUMP device carrying the gyro (or the
|
|
171
171
|
opened ``PUMPDevice`` itself).
|
|
172
|
-
ext_port (ExtPort): Extension port the
|
|
173
|
-
``OSError`` if there is no
|
|
172
|
+
ext_port (ExtPort): Extension port the gyro is plugged into. Raises
|
|
173
|
+
``OSError`` if there is no gyro there.
|
|
174
174
|
"""
|
|
175
175
|
|
|
176
176
|
def read(self) -> MaybeAwaitableEuler:
|
|
@@ -183,6 +183,10 @@ class IMU(_Stream):
|
|
|
183
183
|
"""reset_heading(angle=0) -- make the current heading read as ``angle``."""
|
|
184
184
|
|
|
185
185
|
|
|
186
|
+
IMU = Gyro
|
|
187
|
+
"""Alias of :class:`Gyro`."""
|
|
188
|
+
|
|
189
|
+
|
|
186
190
|
class FloorPro:
|
|
187
191
|
"""LP-FloorPro connected to a PeakHub port, speaking PUMP."""
|
|
188
192
|
|
|
@@ -210,8 +214,11 @@ class FloorPro:
|
|
|
210
214
|
The TCS3400 on extension port 1 or 2; raises ``OSError`` if none.
|
|
211
215
|
"""
|
|
212
216
|
|
|
213
|
-
def
|
|
214
|
-
"""
|
|
217
|
+
def gyro(self, ext_port: int = 2) -> Gyro:
|
|
218
|
+
"""gyro(ext_port=2) -> Gyro -- the gyro on extension port 1 or 2; raises ``OSError`` if none."""
|
|
219
|
+
|
|
220
|
+
def imu(self, ext_port: int = 2) -> Gyro:
|
|
221
|
+
"""imu(ext_port=2) -> Gyro -- alias of :meth:`gyro`."""
|
|
215
222
|
|
|
216
223
|
def streams(self) -> Tuple[StreamInfo, ...]:
|
|
217
224
|
"""streams() -> Tuple -- the enumerated streams ``(id, url, ext_port, state_len)``."""
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|