sensor-sdk 0.0.49__tar.gz → 0.0.50__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.0.49/sensor_sdk.egg-info → sensor_sdk-0.0.50}/PKG-INFO +1 -1
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/bleak_process.py +1 -1
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/gforce.py +11 -29
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50/sensor_sdk.egg-info}/PKG-INFO +1 -1
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/setup.py +1 -1
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/LICENSE.txt +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/README.md +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/__init__.py +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/bleak_host.py +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/sensor_controller.py +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/sensor_data.py +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/sensor_data_context.py +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/sensor_device.py +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/sensor_profile.py +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor/sensor_utils.py +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor_sdk.egg-info/SOURCES.txt +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor_sdk.egg-info/dependency_links.txt +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor_sdk.egg-info/requires.txt +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor_sdk.egg-info/top_level.txt +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/sensor_sdk.egg-info/zip-safe +0 -0
- {sensor_sdk-0.0.49 → sensor_sdk-0.0.50}/setup.cfg +0 -0
|
@@ -148,7 +148,7 @@ class BleakProcess(multiprocessing.Process):
|
|
|
148
148
|
if self._scanner is None:
|
|
149
149
|
self._scanner = BleakScanner(
|
|
150
150
|
detection_callback=_match_device,
|
|
151
|
-
service_uuids=[
|
|
151
|
+
service_uuids=[RFSTAR_SERVICE_GUID, SERVICE_GUID],
|
|
152
152
|
)
|
|
153
153
|
|
|
154
154
|
def _ensure_gforce_loop(self):
|
|
@@ -502,34 +502,11 @@ class GForce:
|
|
|
502
502
|
raise ConnectionError("Connect %s fail: %s" % (self._device.name , e))
|
|
503
503
|
|
|
504
504
|
def _on_data_response(self, q: queue.Queue[bytes], bs: bytearray):
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
# if is_partial_data:
|
|
511
|
-
# packet_id = bs[1]
|
|
512
|
-
# if self.packet_id != 0 and self.packet_id != packet_id + 1:
|
|
513
|
-
# raise Exception(
|
|
514
|
-
# "Unexpected packet id: expected {} got {}".format(
|
|
515
|
-
# self.packet_id + 1,
|
|
516
|
-
# packet_id,
|
|
517
|
-
# )
|
|
518
|
-
# )
|
|
519
|
-
# elif self.packet_id == 0 or self.packet_id > packet_id:
|
|
520
|
-
# self.packet_id = packet_id
|
|
521
|
-
# self.data_packet += bs[2:]
|
|
522
|
-
|
|
523
|
-
# if self.packet_id == 0:
|
|
524
|
-
# full_packet = self.data_packet
|
|
525
|
-
# self.data_packet = []
|
|
526
|
-
# else:
|
|
527
|
-
# full_packet = bs
|
|
528
|
-
|
|
529
|
-
full_packet = bs
|
|
530
|
-
if len(full_packet) == 0:
|
|
531
|
-
return
|
|
532
|
-
q.put_nowait(bytes(full_packet))
|
|
505
|
+
try:
|
|
506
|
+
q.put_nowait(bytes(bs))
|
|
507
|
+
except queue.Full:
|
|
508
|
+
while not q.empty():
|
|
509
|
+
q.get_nowait()
|
|
533
510
|
|
|
534
511
|
@staticmethod
|
|
535
512
|
def _convert_acceleration_to_g(data: bytes) -> np.ndarray[np.float32]:
|
|
@@ -591,7 +568,12 @@ class GForce:
|
|
|
591
568
|
return emg_gesture_data.reshape(-1, num_channels)
|
|
592
569
|
|
|
593
570
|
def _on_universal_response(self, _: BleakGATTCharacteristic, bs: bytearray):
|
|
594
|
-
self._raw_data_buf
|
|
571
|
+
q = self._raw_data_buf
|
|
572
|
+
try:
|
|
573
|
+
q.put_nowait(bytes(bs))
|
|
574
|
+
except queue.Full:
|
|
575
|
+
while not q.empty():
|
|
576
|
+
q.get_nowait()
|
|
595
577
|
|
|
596
578
|
def _on_cmd_response(self, _: BleakGATTCharacteristic, bs: bytearray):
|
|
597
579
|
sensor_utils.async_exec(self.async_on_cmd_response(bs), self.event_loop)
|
|
@@ -8,7 +8,7 @@ with open(os.path.join(this_directory, "README.md"), "r", encoding="utf-8") as f
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="sensor-sdk",
|
|
11
|
-
version="0.0.
|
|
11
|
+
version="0.0.50",
|
|
12
12
|
description="Python sdk for Synchroni",
|
|
13
13
|
long_description=long_description,
|
|
14
14
|
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
|