sensor-sdk 0.2.3__tar.gz → 0.2.6__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.
- {sensor_sdk-0.2.3/sensor_sdk.egg-info → sensor_sdk-0.2.6}/PKG-INFO +1 -1
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/__init__.py +4 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/sensor_data_context.py +12 -6
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6/sensor_sdk.egg-info}/PKG-INFO +1 -1
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/setup.py +6 -1
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/LICENSE.txt +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/README.md +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/bleak_host.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/bleak_no_ack_patch.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/bleak_process.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/fb/DataType.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/fb/Sample.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/fb/SensorData.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/fb/__init__.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/gforce.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/sdk_log.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/sensor_controller.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/sensor_data.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/sensor_data_pool.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/sensor_device.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/sensor_profile.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/sensor_utils.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor/winrt_high_throughput.py +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor_sdk.egg-info/SOURCES.txt +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor_sdk.egg-info/dependency_links.txt +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor_sdk.egg-info/requires.txt +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor_sdk.egg-info/top_level.txt +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/sensor_sdk.egg-info/zip-safe +0 -0
- {sensor_sdk-0.2.3 → sensor_sdk-0.2.6}/setup.cfg +0 -0
|
@@ -6,6 +6,9 @@ from sensor.winrt_high_throughput import apply as _apply_winrt_high_throughput_p
|
|
|
6
6
|
from sensor.bleak_no_ack_patch import apply as _apply_bleak_no_ack_patch
|
|
7
7
|
import os
|
|
8
8
|
|
|
9
|
+
# SDK 版本号(单一数据源,setup.py 打包时从这里读取)
|
|
10
|
+
__version__ = "0.2.6"
|
|
11
|
+
|
|
9
12
|
# Windows 下尝试给 bleak WinRT backend 打高吞吐率连接参数补丁
|
|
10
13
|
_apply_winrt_high_throughput_patch()
|
|
11
14
|
|
|
@@ -23,4 +26,5 @@ __all__ = [
|
|
|
23
26
|
"DataType",
|
|
24
27
|
"Sample",
|
|
25
28
|
"SensorData",
|
|
29
|
+
"__version__",
|
|
26
30
|
]
|
|
@@ -874,10 +874,8 @@ class SensorProfileDataCtx:
|
|
|
874
874
|
self._device_info = info
|
|
875
875
|
await self.initDataTransfer(True)
|
|
876
876
|
|
|
877
|
-
#
|
|
878
|
-
if
|
|
879
|
-
and self.hasEEG()
|
|
880
|
-
and not self.hasPPG()):
|
|
877
|
+
# 非 RFSTAR 芯片设备默认关闭 IMU(RFSTAR 保留默认开启)
|
|
878
|
+
if self._chip_type != BLEChipType.RFSTAR:
|
|
881
879
|
self.notify_map["NTF_IMU"] = "OFF"
|
|
882
880
|
self.notify_map["NTF_GFORCE_ACC"] = "OFF"
|
|
883
881
|
self.notify_map["NTF_GFORCE_GYRO"] = "OFF"
|
|
@@ -1296,7 +1294,11 @@ class SensorProfileDataCtx:
|
|
|
1296
1294
|
if sensor_data is None or sensor_data.sampleRate <= 0:
|
|
1297
1295
|
return True
|
|
1298
1296
|
|
|
1299
|
-
self.checkReadSamples(data, sensor_data, 0, -1)
|
|
1297
|
+
res = self.checkReadSamples(data, sensor_data, 0, -1, on_error_callback)
|
|
1298
|
+
if res == ReadSamplesResult.Error:
|
|
1299
|
+
return False
|
|
1300
|
+
if res == ReadSamplesResult.Repeated:
|
|
1301
|
+
return True
|
|
1300
1302
|
sampleInterval = 1000.0 / sensor_data.sampleRate
|
|
1301
1303
|
lastSampleIndex = sensor_data.lastPackageCounter * sensor_data.packageSampleCount
|
|
1302
1304
|
sensor_data.channelSamples = []
|
|
@@ -1349,7 +1351,11 @@ class SensorProfileDataCtx:
|
|
|
1349
1351
|
return False
|
|
1350
1352
|
|
|
1351
1353
|
sensor_data = self.sensorDatas[SensorDataType.DATA_TYPE_IMPEDANCE]
|
|
1352
|
-
self.checkReadSamples(data, sensor_data, 0, -1, on_error_callback)
|
|
1354
|
+
res = self.checkReadSamples(data, sensor_data, 0, -1, on_error_callback)
|
|
1355
|
+
if res == ReadSamplesResult.Error:
|
|
1356
|
+
return False
|
|
1357
|
+
if res == ReadSamplesResult.Repeated:
|
|
1358
|
+
return True
|
|
1353
1359
|
sampleInterval = 1000.0 / sensor_data.sampleRate if sensor_data.sampleRate > 0 else 0
|
|
1354
1360
|
|
|
1355
1361
|
for index in range(channelCount):
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import re
|
|
2
3
|
|
|
3
4
|
from setuptools import setup, find_packages
|
|
4
5
|
|
|
@@ -6,9 +7,13 @@ this_directory = os.path.abspath(os.path.dirname(__file__))
|
|
|
6
7
|
with open(os.path.join(this_directory, "README.md"), "r", encoding="utf-8") as f:
|
|
7
8
|
long_description = f.read()
|
|
8
9
|
|
|
10
|
+
|
|
11
|
+
with open(os.path.join(this_directory, "sensor", "__init__.py"), "r", encoding="utf-8") as f:
|
|
12
|
+
version = re.search(r'^__version__\s*=\s*["\']([^"\']+)["\']', f.read(), re.M).group(1)
|
|
13
|
+
|
|
9
14
|
setup(
|
|
10
15
|
name="sensor-sdk",
|
|
11
|
-
version=
|
|
16
|
+
version=version,
|
|
12
17
|
description="Python sdk for Synchroni",
|
|
13
18
|
long_description=long_description,
|
|
14
19
|
long_description_content_type="text/markdown",
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|