toio-py-fork 1.1.0.post2.dev1__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.
- toio_py_fork-1.1.0.post2.dev1/.flake8 +5 -0
- toio_py_fork-1.1.0.post2.dev1/.gitignore +20 -0
- toio_py_fork-1.1.0.post2.dev1/CHANGELOG.md +38 -0
- toio_py_fork-1.1.0.post2.dev1/CHANGELOG_FORK.ja.md +67 -0
- toio_py_fork-1.1.0.post2.dev1/CHANGELOG_FORK.md +66 -0
- toio_py_fork-1.1.0.post2.dev1/CODE_OF_CONDUCT.md +78 -0
- toio_py_fork-1.1.0.post2.dev1/CONTRIBUTING.md +57 -0
- toio_py_fork-1.1.0.post2.dev1/LICENSE +7 -0
- toio_py_fork-1.1.0.post2.dev1/PKG-INFO +590 -0
- toio_py_fork-1.1.0.post2.dev1/README.ja.md +557 -0
- toio_py_fork-1.1.0.post2.dev1/README.md +559 -0
- toio_py_fork-1.1.0.post2.dev1/SETUP_GUIDE.en.md +157 -0
- toio_py_fork-1.1.0.post2.dev1/SETUP_GUIDE.ja.md +155 -0
- toio_py_fork-1.1.0.post2.dev1/SETUP_GUIDE.zh.md +139 -0
- toio_py_fork-1.1.0.post2.dev1/SIMPLE_API.en.md +547 -0
- toio_py_fork-1.1.0.post2.dev1/SIMPLE_API.ja.md +552 -0
- toio_py_fork-1.1.0.post2.dev1/TESTING.ja.md +409 -0
- toio_py_fork-1.1.0.post2.dev1/TESTING.md +445 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/INSTALL_TO_PYTHONISTA3.en.rst +73 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/INSTALL_TO_PYTHONISTA3.ja.rst +71 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/Makefile +20 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/_templates/version.html +8 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/conf.py +66 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/index.rst +18 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/make.bat +35 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.coordinate_systems.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.base_class.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.battery.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.button.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.configuration.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.id_information.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.indicator.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.motor.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.rst +27 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.sensor.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.api.sound.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.multi_cubes.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.notification_handler_info.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.cube.rst +28 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.device_interface.ble.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.device_interface.dummy.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.device_interface.rst +19 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.logger.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.position.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.rst +35 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.scanner.ble.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.scanner.rst +18 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.simple.async_simple.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.simple.rst +18 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.standard_id.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.toio_uuid.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/docs-conf/toio.utility.rst +7 -0
- toio_py_fork-1.1.0.post2.dev1/examples/async_gather.py +49 -0
- toio_py_fork-1.1.0.post2.dev1/examples/async_gather_multi.py +52 -0
- toio_py_fork-1.1.0.post2.dev1/examples/async_task_group.py +54 -0
- toio_py_fork-1.1.0.post2.dev1/examples/detect_mat.py +63 -0
- toio_py_fork-1.1.0.post2.dev1/examples/motor_control.py +91 -0
- toio_py_fork-1.1.0.post2.dev1/examples/multi_cubes_with_attribute.py +37 -0
- toio_py_fork-1.1.0.post2.dev1/examples/multi_cubes_with_named.py +37 -0
- toio_py_fork-1.1.0.post2.dev1/examples/read_position.py +62 -0
- toio_py_fork-1.1.0.post2.dev1/examples/scan_and_connect.py +34 -0
- toio_py_fork-1.1.0.post2.dev1/examples/tutorial_pursuer.py +73 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/angle_control.py +67 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/basic_motor_control.py +41 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/concurrent_futures_simple.py +46 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/get_current_grid.py +40 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/get_information_1.py +75 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/get_information_2.py +51 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/get_standard_id.py +51 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/goto_a_gird.py +42 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/lamp.py +40 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/move_to.py +35 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/multi_cubes_async_simple.py +46 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/sound.py +43 -0
- toio_py_fork-1.1.0.post2.dev1/examples-simple/step.py +27 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2022-12-05-09-46-13.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2022-12-05-09-47-14.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2022-12-05-09-53-08.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2022-12-08-13-58-34.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2022-12-16-14-16-29.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2022-12-16-14-20-09.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2022-12-16-14-23-28.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2022-12-16-14-24-35.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2023-01-06-09-38-30.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2023-01-06-09-39-00.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2023-01-06-09-39-51.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2023-01-06-09-40-03.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2023-01-06-09-41-19.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2023-02-27-15-14-45.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/image/IMG-2023-02-27-15-15-11.png +0 -0
- toio_py_fork-1.1.0.post2.dev1/mkdocs/_templates/version.html +8 -0
- toio_py_fork-1.1.0.post2.dev1/mkdocs/add_noindex.py +57 -0
- toio_py_fork-1.1.0.post2.dev1/mkdocs/conf.py +66 -0
- toio_py_fork-1.1.0.post2.dev1/mkdocs/index.html +9 -0
- toio_py_fork-1.1.0.post2.dev1/mkdocs/mkdocs.sh +49 -0
- toio_py_fork-1.1.0.post2.dev1/pyproject.toml +118 -0
- toio_py_fork-1.1.0.post2.dev1/pythonista3/INSTALL_TO_PYTHONISTA3.en.md +58 -0
- toio_py_fork-1.1.0.post2.dev1/pythonista3/INSTALL_TO_PYTHONISTA3.ja.md +56 -0
- toio_py_fork-1.1.0.post2.dev1/pythonista3/install_toio.py.in +152 -0
- toio_py_fork-1.1.0.post2.dev1/pythonista3/make_install_script.sh +25 -0
- toio_py_fork-1.1.0.post2.dev1/tests/__init__.py +0 -0
- toio_py_fork-1.1.0.post2.dev1/tests/_cubes.py +6 -0
- toio_py_fork-1.1.0.post2.dev1/tests/check_coverage.sh +14 -0
- toio_py_fork-1.1.0.post2.dev1/tests/conftest.py +158 -0
- toio_py_fork-1.1.0.post2.dev1/tests/make_cube_list.py +47 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_10_two_cubes/_cubes.py +1 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_10_two_cubes/test_2cubes_connect_v1_2.py +115 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_10_two_cubes/test_2cubes_scanner.py +169 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_10_two_cubes/test_multiple_class.py +89 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_11_cube_off/test_cube_off.py +49 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_20_interactive/test_id_information.py +161 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_20_interactive/test_indicator.py +107 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_20_interactive/test_notification_handler_v1_2.py +119 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_20_interactive/test_savable_configuration.py +170 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_20_interactive/test_sensor_v1_2.py +541 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_definition/test_ble_interface.py +75 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_definition/test_configuration.py +61 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_definition/test_misc.py +37 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_definition/test_scanner.py +117 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_definition/test_syntax_sugar.py +56 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_definition/test_toio_core_cube.py +71 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_mat/test_motor.py +153 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_mat/test_motor_v1_2.py +137 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_battery.py +44 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_button.py +44 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_configuration.py +247 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_connect.py +67 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_connect_v1_2.py +118 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_connection_interval_v1_2.py +145 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_indicator_v1_2.py +108 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_savable_configuration.py +141 -0
- toio_py_fork-1.1.0.post2.dev1/tests/test_50_single_cube/test_sound.py +71 -0
- toio_py_fork-1.1.0.post2.dev1/toio/__init__.py +175 -0
- toio_py_fork-1.1.0.post2.dev1/toio/coordinate_systems.py +76 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/__init__.py +387 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/__init__.py +70 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/base_class.py +207 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/battery.py +86 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/button.py +97 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/configuration.py +1137 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/id_information.py +166 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/indicator.py +286 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/motor.py +630 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/sensor.py +360 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/api/sound.py +316 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/multi_cubes.py +241 -0
- toio_py_fork-1.1.0.post2.dev1/toio/cube/notification_handler_info.py +118 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/__init__.py +135 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/ble.py +273 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/dummy.py +60 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/CentralManagerDelegate.py +370 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/PeripheralDelegate.py +670 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/__init__.py +9 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/characteristic.py +125 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/client.py +409 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/descriptor.py +49 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/objc_types.py +63 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/scanner.py +173 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/service.py +49 -0
- toio_py_fork-1.1.0.post2.dev1/toio/device_interface/pythonista3corebluetooth/utils.py +56 -0
- toio_py_fork-1.1.0.post2.dev1/toio/logger.py +56 -0
- toio_py_fork-1.1.0.post2.dev1/toio/position.py +440 -0
- toio_py_fork-1.1.0.post2.dev1/toio/py.typed +0 -0
- toio_py_fork-1.1.0.post2.dev1/toio/scanner/__init__.py +16 -0
- toio_py_fork-1.1.0.post2.dev1/toio/scanner/ble.py +216 -0
- toio_py_fork-1.1.0.post2.dev1/toio/scanner/platform/windows_ble.py +68 -0
- toio_py_fork-1.1.0.post2.dev1/toio/simple/__init__.py +952 -0
- toio_py_fork-1.1.0.post2.dev1/toio/simple/async_simple.py +740 -0
- toio_py_fork-1.1.0.post2.dev1/toio/standard_id.py +116 -0
- toio_py_fork-1.1.0.post2.dev1/toio/toio_uuid.py +33 -0
- toio_py_fork-1.1.0.post2.dev1/toio/utility.py +23 -0
- toio_py_fork-1.1.0.post2.dev1/tutorial/tutorial.en.py +706 -0
- toio_py_fork-1.1.0.post2.dev1/tutorial/tutorial.ja.py +708 -0
- toio_py_fork-1.1.0.post2.dev1/tutorial/tutorial.zh.py +755 -0
- toio_py_fork-1.1.0.post2.dev1/uv.lock +2282 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# General Python ignores
|
|
2
|
+
build/
|
|
3
|
+
dist/
|
|
4
|
+
__pycache__/
|
|
5
|
+
__pypackages__/
|
|
6
|
+
.ipynb_checkpoints/
|
|
7
|
+
*.pyc
|
|
8
|
+
*~
|
|
9
|
+
*/.mypy_cache/
|
|
10
|
+
.venv*/
|
|
11
|
+
.idea/
|
|
12
|
+
.DS_Store
|
|
13
|
+
|
|
14
|
+
.vscode/*
|
|
15
|
+
!.vscode/extensions.json
|
|
16
|
+
|
|
17
|
+
# Project ignores
|
|
18
|
+
.coverage
|
|
19
|
+
|
|
20
|
+
.codex
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.1.0]
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Support for toio BLE protocol version v2.4.0
|
|
8
|
+
- Compatibility with Python 3.8 and later versions
|
|
9
|
+
- Support for Pythonista3 application (#1)
|
|
10
|
+
- `py.typed` file for enhanced type hinting
|
|
11
|
+
- `AsyncSimpleCube` class to facilitate simple API usage with asyncio
|
|
12
|
+
- `MultipleToioCoreCubes` class for simplified control of multiple cubes
|
|
13
|
+
- `is_connect()` method in `CubeInterface` class to check connection status
|
|
14
|
+
- Initialization with `Sequence` in `cube.api.indicator` functions
|
|
15
|
+
- Initialization with `Sequence` in `cube.api.motor_control` functions
|
|
16
|
+
- `DummyInterface` class for debugging purposes
|
|
17
|
+
- `NotificationHandlerInfo` class as a second argument for notification handlers
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- `ToioCoreCube` class now verifies protocol version during connection
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Issue where `cube.api.sound.stop()` did not function (#3)
|
|
26
|
+
- Inability of `SimpleCube.play_sound()` to play sounds longer than 250ms
|
|
27
|
+
- Potential failures when using `concurrent.futures` or `threading.Thread`
|
|
28
|
+
|
|
29
|
+
## [1.0.2]
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Updated document
|
|
34
|
+
- Changed minimum `bleak` version to 0.20.1
|
|
35
|
+
|
|
36
|
+
## [1.0.1]
|
|
37
|
+
|
|
38
|
+
- First Release
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# toio.py-fork の変更履歴
|
|
2
|
+
|
|
3
|
+
このファイルは、独自の `toio.py-fork` ブランチで行った変更をまとめたものです。
|
|
4
|
+
公式プロジェクトの変更履歴については [CHANGELOG.md](./CHANGELOG.md) を参照してください。
|
|
5
|
+
|
|
6
|
+
## [未リリース]
|
|
7
|
+
|
|
8
|
+
### 追加
|
|
9
|
+
|
|
10
|
+
- toioコアキューブ技術仕様 v2.5.0 で追加されたAPIへの対応を追加しました:
|
|
11
|
+
- スピーカー消音設定:`SetSpeakerMute` (command 0x33) および `ResponseSpeakerMuteSettings` (response 0xB3)。
|
|
12
|
+
- 保存した設定の初期化:`ResetConfiguration` (command 0x0F) および `ResponseConfigurationReset` (response 0x8F)。
|
|
13
|
+
- リモート電源オフ:`RequestRemotePowerOff` (command 0x34) および `ResponseRemotePowerOff` (response 0xB4)。
|
|
14
|
+
- 現在のコネクションインターバル値の取得:`GetCurrentConnectionIntervalValue` (command 0x32) および `ResponseGettingCurrentConnectionInterval` (response 0xB2)。
|
|
15
|
+
- ランプのなめらかな点滅:`SmoothFlashing` (command 0x70)。
|
|
16
|
+
- これらの機能を `AsyncSimpleCube` に統合しました。
|
|
17
|
+
- `ToioCoreCube` の `SUPPORTED_MINOR_VERSION` を `5` に更新しました。
|
|
18
|
+
- import package 名 `toio` は維持したまま、PyPI distribution 名を `toio-py-fork` とする独自 fork 配布を開始しました。
|
|
19
|
+
- scanner に scan strategy を追加しました。
|
|
20
|
+
- `strategy="best"` は timeout まで scan を続け、sort 後の最良候補を返します。
|
|
21
|
+
- `strategy="quick"` は指定数の cube が見つかった時点で scan を終了して返します。
|
|
22
|
+
- `MultipleToioCoreCubes` および `ToioCoreCube` の `__init__` にキーワード引数(`**kwargs`)のサポートを追加しました。これにより、`strategy="quick"` などのスキャン設定を直感的に指定できるようになりました。
|
|
23
|
+
- scanner strategy は、`scan(num=N)` が常に timeout まで待つ一方で、cube ID や BLE address を指定した scan は対象がすべて見つかった時点で終了することを指摘した [toio/toio.py#15](https://github.com/toio/toio.py/issues/15) への対応として追加しました。
|
|
24
|
+
- `UniversalBleScanner.scan_best()` と `UniversalBleScanner.scan_quick()` の helper を追加しました。
|
|
25
|
+
- scanner strategy 値の validation を追加しました。
|
|
26
|
+
- 実機 cube を必要としない definition-level test を追加しました。
|
|
27
|
+
- `connect()` / `disconnect()` が `None` を返す Bleak version 向けの BLE connection state handling。
|
|
28
|
+
- `set_collision_detection_threshold()` の configuration command byte。
|
|
29
|
+
- `best` / `quick` の scanner strategy 動作。
|
|
30
|
+
- `CubeInfo` からの `ToioCoreCube` 初期化。
|
|
31
|
+
- この fork 専用の changelog を追加しました。
|
|
32
|
+
|
|
33
|
+
### 変更
|
|
34
|
+
|
|
35
|
+
- package management を Poetry から uv に移行し、build backend を Hatchling に変更しました。
|
|
36
|
+
- `poetry.lock` と `poetry.toml` を削除し、`uv.lock` を追加しました。
|
|
37
|
+
- `pyproject.toml` を Poetry metadata 形式から PEP 621 project metadata 形式に移行しました。
|
|
38
|
+
- PyPI distribution 名を `toio.py` / `toio-py` から `toio-py-fork` に変更しました。
|
|
39
|
+
- `toio.py-fork` repository 用に project metadata と documentation link を更新しました。
|
|
40
|
+
- 対応 Python version の metadata を Python 3.8.1 以上から Python 3.10 以上に変更しました。
|
|
41
|
+
- Bleak の requirement を `bleak>=3,<4` に更新しました。
|
|
42
|
+
- development dependency group から Poetry 自体を削除しました。
|
|
43
|
+
- uv ベースの project layout に合わせて tests と tooling metadata を更新しました。
|
|
44
|
+
|
|
45
|
+
### 修正
|
|
46
|
+
|
|
47
|
+
- `Configuration.set_collision_detection_threshold()` が horizontal detection threshold command ではなく `SetCollisionDetectionThreshold` を送信するよう修正しました。
|
|
48
|
+
- `connect()` / `disconnect()` が `None` を返す Bleak version に対応するため、`BleCube.connect()` と `BleCube.disconnect()` の handling を修正しました。
|
|
49
|
+
- `BleCube` の connection state tracking を修正し、connect / disconnect 後に `self.connected` が `BleakClient.is_connected` に追従するようにしました。
|
|
50
|
+
- `CubeInfo` を使った `ToioCoreCube` 初期化を修正しました。
|
|
51
|
+
- `CubeInfo.interface` を実際の cube interface として使うようにしました。
|
|
52
|
+
- 明示的に name が指定されていない場合は `CubeInfo.name` を default cube name として使うようにしました。
|
|
53
|
+
- 説明文では `CubeInfo` で初期化できると読める一方で、実際には `CubeInfo` 自体を cube interface として扱ってしまい `connect()` に失敗する [toio/toio.py#14](https://github.com/toio/toio.py/issues/14) への対応として、`ToioCoreCube` の `CubeInfo` 初期化を修正しました。
|
|
54
|
+
- README の sample code で `ToioCoreCube` に `CubeInfo` を直接渡す例を追加しました。
|
|
55
|
+
- README の motor notification example で `Motor.is_my_data()` を使って notification を parse するよう修正しました。
|
|
56
|
+
- README sample の古い argument や末尾の不要な空行を修正しました。
|
|
57
|
+
- definition-only test 実行時に、実機 cube の setup を skip するよう修正しました。
|
|
58
|
+
- `_cubes.py` を生成する test helper command で、正しい script path を使い path を安全に quote するよう修正しました。
|
|
59
|
+
|
|
60
|
+
### ドキュメント
|
|
61
|
+
|
|
62
|
+
- この repository が Sony Interactive Entertainment Inc. または toio(tm) と提携、承認、支援関係にない独立した非公式 fork であることを README に追記しました。
|
|
63
|
+
- setup guide と contribution instruction を `toio.py-fork` repository URL と `toio-py-fork` distribution 名に更新しました。
|
|
64
|
+
- README の installation example を `toio-py-fork` に更新しました。
|
|
65
|
+
- fork distribution に合わせて repository、package、contribution 関連の参照を更新しました。
|
|
66
|
+
- [toio/toio.py#14](https://github.com/toio/toio.py/issues/14) に対する `CubeInfo` 初期化修正の説明を追加しました。
|
|
67
|
+
- [toio/toio.py#15](https://github.com/toio/toio.py/issues/15) に対する scanner strategy の使い方と対応関係を説明しました。
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog for toio.py-fork
|
|
2
|
+
|
|
3
|
+
This file summarizes changes made in the independent `toio.py-fork` branch.
|
|
4
|
+
For the upstream project changelog, see [CHANGELOG.md](./CHANGELOG.md).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Added support for toio core cube technical specification v2.5.0:
|
|
11
|
+
- Added Speaker Mute settings: `SetSpeakerMute` (command 0x33) and `ResponseSpeakerMuteSettings` (response 0xB3).
|
|
12
|
+
- Added Configuration Reset: `ResetConfiguration` (command 0x0F) and `ResponseConfigurationReset` (response 0x8F).
|
|
13
|
+
- Added Remote Power Off: `RequestRemotePowerOff` (command 0x34) and `ResponseRemotePowerOff` (response 0xB4).
|
|
14
|
+
- Added Get Current Connection Interval: `GetCurrentConnectionIntervalValue` (command 0x32) and `ResponseGettingCurrentConnectionInterval` (response 0xB2).
|
|
15
|
+
- Added Smooth Indicator Flashing: `SmoothFlashing` (command 0x70).
|
|
16
|
+
- Integrated these features into `AsyncSimpleCube`.
|
|
17
|
+
- Updated `SUPPORTED_MINOR_VERSION` to `5` in `ToioCoreCube`.
|
|
18
|
+
- Added scanner scan strategies:
|
|
19
|
+
- `strategy="best"` keeps scanning until timeout and returns the best sorted candidates.
|
|
20
|
+
- `strategy="quick"` returns as soon as the requested number of cubes are found.
|
|
21
|
+
- Added keyword argument (`**kwargs`) support to `MultipleToioCoreCubes` and `ToioCoreCube` initialization. This allows intuitive configuration of scan settings, such as `strategy="quick"`.
|
|
22
|
+
- Added the scanner strategies in response to [toio/toio.py#15](https://github.com/toio/toio.py/issues/15), which reported that `scan(num=N)` always waited for the full timeout while scans by cube ID or BLE address terminated early.
|
|
23
|
+
- Added `UniversalBleScanner.scan_best()` and `UniversalBleScanner.scan_quick()` helpers.
|
|
24
|
+
- Added validation for scanner strategy values.
|
|
25
|
+
- Added definition-level tests that do not require physical cubes:
|
|
26
|
+
- BLE connection state handling for Bleak versions whose `connect()` and `disconnect()` methods return `None`.
|
|
27
|
+
- Configuration command bytes for `set_collision_detection_threshold()`.
|
|
28
|
+
- Scanner strategy behavior for `best` and `quick`.
|
|
29
|
+
- `ToioCoreCube` initialization from `CubeInfo`.
|
|
30
|
+
- Added this fork-specific changelog.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- Migrated package management from Poetry to uv with Hatchling as the build backend.
|
|
35
|
+
- Replaced `poetry.lock` and `poetry.toml` with `uv.lock`.
|
|
36
|
+
- Converted `pyproject.toml` from Poetry metadata to PEP 621 project metadata.
|
|
37
|
+
- Changed the PyPI distribution name from `toio.py` / `toio-py` to `toio-py-fork`.
|
|
38
|
+
- Updated project metadata and documentation links for the `toio.py-fork` repository.
|
|
39
|
+
- Updated the supported Python requirement metadata from Python 3.8.1 or later to Python 3.10 or later.
|
|
40
|
+
- Updated the Bleak requirement to `bleak>=3,<4`.
|
|
41
|
+
- Removed Poetry itself from the development dependency group.
|
|
42
|
+
- Updated tests and tooling metadata for the uv-based project layout.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- Fixed `Configuration.set_collision_detection_threshold()` to send `SetCollisionDetectionThreshold` instead of the horizontal detection threshold command.
|
|
47
|
+
- Fixed `BleCube.connect()` and `BleCube.disconnect()` handling for Bleak versions whose connect and disconnect methods return `None`.
|
|
48
|
+
- Fixed `BleCube` connection state tracking so `self.connected` follows `BleakClient.is_connected` after connect and disconnect operations.
|
|
49
|
+
- Fixed `ToioCoreCube` initialization with `CubeInfo`:
|
|
50
|
+
- `CubeInfo.interface` is now used as the actual cube interface.
|
|
51
|
+
- `CubeInfo.name` is used as the default cube name when no explicit name is provided.
|
|
52
|
+
- Fixed `ToioCoreCube` initialization in response to [toio/toio.py#14](https://github.com/toio/toio.py/issues/14), where the documentation described `CubeInfo` initialization but `connect()` failed because the `CubeInfo` object itself was used as the cube interface.
|
|
53
|
+
- Updated README examples to pass `CubeInfo` directly to `ToioCoreCube`.
|
|
54
|
+
- Fixed README motor notification examples to parse notifications with `Motor.is_my_data()`.
|
|
55
|
+
- Fixed README sample cleanup issues, including outdated arguments and trailing blank lines.
|
|
56
|
+
- Fixed definition-only test runs so they skip physical cube setup.
|
|
57
|
+
- Fixed the test helper command that generates `_cubes.py` to use the correct script path and safely quote paths.
|
|
58
|
+
|
|
59
|
+
### Documentation
|
|
60
|
+
|
|
61
|
+
- Added a README notice that this repository is an independent, unofficial fork and is not affiliated with, endorsed by, or sponsored by Sony Interactive Entertainment Inc. or toio(tm).
|
|
62
|
+
- Updated setup guides and contribution instructions to use `toio.py-fork` repository URLs and the `toio-py-fork` distribution name.
|
|
63
|
+
- Updated README installation examples to use `toio-py-fork`.
|
|
64
|
+
- Updated repository, package, and contribution references for the fork distribution.
|
|
65
|
+
- Documented the `CubeInfo` initialization fix for issue [toio/toio.py#14](https://github.com/toio/toio.py/issues/14).
|
|
66
|
+
- Documented scanner strategy usage and the relation to issue [toio/toio.py#15](https://github.com/toio/toio.py/issues/15).
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at
|
|
59
|
+
[this form](https://www.jp.playstation.com/form/toio/inquiry/).
|
|
60
|
+
All complaints will be reviewed and investigated and will result in a response that
|
|
61
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
62
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
63
|
+
Further details of specific enforcement policies may be posted separately.
|
|
64
|
+
|
|
65
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
66
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
67
|
+
members of the project's leadership.
|
|
68
|
+
|
|
69
|
+
## Attribution
|
|
70
|
+
|
|
71
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
72
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
73
|
+
|
|
74
|
+
[homepage]: https://www.contributor-covenant.org
|
|
75
|
+
|
|
76
|
+
For answers to common questions about this code of conduct, see
|
|
77
|
+
https://www.contributor-covenant.org/faq
|
|
78
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Contributing to toio.py
|
|
2
|
+
|
|
3
|
+
Welcome to toio.py! We appreciate your interest in contributing to our project.
|
|
4
|
+
Before contributing to toio.py, please read our [Code of Conduct](./CODE_OF_CONDUCT.md)
|
|
5
|
+
|
|
6
|
+
## Getting started with development
|
|
7
|
+
|
|
8
|
+
### Setup
|
|
9
|
+
|
|
10
|
+
1. [Install poetry](https://python-poetry.org/docs/#installing-with-the-official-installer)
|
|
11
|
+
|
|
12
|
+
2. Clone the toio.py repository
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
git clone https://github.com/kaz399/toio.py-fork
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
3. Run `poetry install` in toio.py repository
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
cd toio.py-fork
|
|
22
|
+
poetry install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Lint and format
|
|
26
|
+
|
|
27
|
+
#### Mandatory:
|
|
28
|
+
|
|
29
|
+
[`black`](https://black.readthedocs.io/en/stable/) and [`isort`](https://pycqa.github.io/isort/) is used in this project.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
poetry run black
|
|
33
|
+
poetry run isort
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### Optional:
|
|
37
|
+
|
|
38
|
+
Checking with [`flake8`](https://flake8.pycqa.org/en/latest/) or [`mypy`](https://www.mypy-lang.org/) is recommended.
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
poetry run flake8
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
poetry run mypy
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
###
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
By contributing your code,
|
|
55
|
+
- you agree to license your contribution under the MIT License; and
|
|
56
|
+
- you represent that (i) your contribution is entirely your original work, and (ii) you are legally entitled to make your contribution.
|
|
57
|
+
Please note if your employer has rights to intellectual property in your contribution, partially or wholly, you must secure permission from your employer to make your contribution on behalf of that employer before submitting your contribution.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
©2023 Sony Interactive Entertainment Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|